6 #define MAX_KERNEL_NAME 1024 7 #define checkError(E, S) errorCheck(E,S,__FILE__,__LINE__) 14 static std::mutex mutex;
18 std::lock_guard<std::mutex> lock(mutex);
19 if (instance ==
nullptr) {
35 bool printDevInfo(cl_device_id device_id);
42 void getKernelName(cl_int iKernel,
char *kernel);
56 void errorCheck(cl_int err,
const char *operation,
char *filename,
int line);
61 cl_command_queue commands;
64 cl_device_id device_id;
66 cl_platform_id *platform;
68 cl_uint nUnits, nDimensions;
74 std::mutex OpenCL::mutex;
75 OpenCL* OpenCL::instance =
nullptr;
void errorCheck(cl_int err, const char *operation, char *filename, int line)
cl_context & getContext()
static void releaseInstance()
cl_program * getProgram()
static OpenCL * getInstance()
cl_command_queue & getCommand()