minimize.h 1.29 KB
/*
 * minimize.h
 *
 *  Created on: 30/01/2017
 *      Author: pedro
 */

#ifndef SRC_CONSTRAINTS_MINIMIZE_H_
#define SRC_CONSTRAINTS_MINIMIZE_H_


#include <stdbool.h>
#include <sys/types.h>

#include "../config.h"
#include "../constraints.h"
#include "../kernels/cl_aux_functions.h"
#include "../kernels/cl_constraints.h"
#include "../kernels/cl_ttl.h"

unsigned int c_minimize(unsigned int var_to_opt_id);
unsigned int c_minimize_reif(unsigned int var_to_opt_id, int reif_v_id);
bool minimize_check(constr* c, bool explored);

#if CS_MINIMIZE == 1
void minimize_prop(CL_MEMORY VARS_PROP* vs_prop_, CL_MEMORY unsigned short* vs_id_to_prop_, __global unsigned int* val_to_opt, bool* prop_ok TTL_CTR);
#if CS_R_MINIMIZE == 1
void minimize_reif(CL_MEMORY VARS_PROP* vs_prop_, CL_CS_MEM cl_constr* current_cs, CL_MEMORY unsigned short* vs_id_to_prop_, __global unsigned int* val_to_opt TTL_CTR);
void minimize_prop_opposite(CL_MEMORY VARS_PROP* vs_prop_, CL_MEMORY unsigned short* vs_id_to_prop_, __global unsigned int* val_to_opt, bool* prop_ok TTL_CTR);
#endif
void minimize_propagate(CL_MEMORY VARS_PROP* vs_prop_, CL_CS_MEM cl_constr* current_cs, CL_MEMORY unsigned short* vs_id_to_prop_, __global unsigned int* val_to_opt_g,
		bool* prop_ok PROPAGATED_FUNC TTL_CTR);
#endif

#endif /* SRC_CONSTRAINTS_MINIMIZE_H_ */