mirror of https://github.com/GOSTSec/sgminer
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
828 B
36 lines
828 B
#ifndef BUILD_KERNEL_H |
|
#define BUILD_KERNEL_H |
|
|
|
#include <stdbool.h> |
|
#include "logging.h" |
|
|
|
#ifdef __APPLE_CC__ |
|
#include <OpenCL/opencl.h> |
|
#else |
|
#include <CL/cl.h> |
|
#endif |
|
|
|
typedef struct _build_kernel_data { |
|
char source_filename[255]; |
|
char binary_filename[255]; |
|
char compiler_options[512]; |
|
|
|
cl_context context; |
|
cl_device_id *device; |
|
|
|
// for compiler options |
|
char platform[64]; |
|
char sgminer_path[255]; |
|
const char *kernel_path; |
|
size_t work_size; |
|
bool has_bit_align; |
|
bool patch_bfi; |
|
float opencl_version; |
|
} build_kernel_data; |
|
|
|
bool needs_bfi_patch(build_kernel_data *data); |
|
cl_program build_opencl_kernel(build_kernel_data *data, const char *filename); |
|
bool save_opencl_kernel(build_kernel_data *data, cl_program program); |
|
void set_base_compiler_options(build_kernel_data *data); |
|
|
|
#endif /* BUILD_KERNEL_H */
|
|
|