solve.h 1.23 KB
/*
 * solve.h
 *
 *  Created on: 28/01/2015
 *      Author: pedro
 */

#ifndef SRC_SOLVE_H_
#define SRC_SOLVE_H_

#include "CL/cl_platform.h"

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
#include "utils\pthread_win32\pthread.h"
#include "windows.h"
#else
#include <pthread.h>
#include <sys/time.h>
#endif

#include "CL/cl.h"
#include "config.h"
#include "split.h"

cl_ulong count_sols(device_args* dev_args, device_info* dev_info, unsigned int depth, unsigned int n_ss, pthread_mutex_t* stats_lock, bool filtering);
cl_ulong find_one_sol(device_args* dev_args, device_info* dev_info, unsigned char* sol_found, unsigned int depth, unsigned int n_ss, pthread_mutex_t* stats_lock, bool filtering);
cl_ulong find_best_sol(device_args* dev_args, device_info* dev_info, cl_uint* val_to_opt, pthread_mutex_t* opt_lock, unsigned int depth, unsigned int n_ss,
		pthread_mutex_t* stats_lock, bool filtering);

void set_strs_generat_data(device_args* dev_args, device_info* dev_info, unsigned int depth, unsigned int n_ss, bool filtering);
void get_stats(device_args* dev_args, device_info* dev_info, pthread_mutex_t* stats_lock);
bool get_filtering_results(device_args* dev_args, device_info* dev_info);

#endif /* SRC_SOLVE_H_ */