diff --git a/src/opencl/image_buffer_opencl.h b/src/opencl/image_buffer_opencl.h index fefe7f8b..5ebe84c3 100644 --- a/src/opencl/image_buffer_opencl.h +++ b/src/opencl/image_buffer_opencl.h @@ -20,11 +20,12 @@ #pragma once -#define CL_TARGET_OPENCL_VERSION 210 - #if defined( __APPLE__ ) || defined( __MACOSX ) #include #else + +#define CL_TARGET_OPENCL_VERSION 210 + #include #endif diff --git a/src/opencl/opencl_device.cpp b/src/opencl/opencl_device.cpp index 5f362f9e..bbd5357f 100644 --- a/src/opencl/opencl_device.cpp +++ b/src/opencl/opencl_device.cpp @@ -144,7 +144,13 @@ namespace multiCL OpenCLQueue::OpenCLQueue( const OpenCLContext & context, cl_device_id deviceId ) { cl_int error; + +#if defined( __APPLE__ ) || defined( __MACOSX ) + _commandQueue = clCreateCommandQueue( context(), deviceId, 0, &error ); +#else _commandQueue = clCreateCommandQueueWithProperties( context(), deviceId, 0, &error ); +#endif + openCLCheck( error ); } diff --git a/src/opencl/opencl_device.h b/src/opencl/opencl_device.h index 0a740618..edae8c15 100644 --- a/src/opencl/opencl_device.h +++ b/src/opencl/opencl_device.h @@ -20,11 +20,12 @@ #pragma once -#define CL_TARGET_OPENCL_VERSION 210 - #if defined( __APPLE__ ) || defined( __MACOSX ) #include #else + +#define CL_TARGET_OPENCL_VERSION 210 + #include #endif diff --git a/src/opencl/opencl_helper.h b/src/opencl/opencl_helper.h index cda68e83..cc7c65f7 100644 --- a/src/opencl/opencl_helper.h +++ b/src/opencl/opencl_helper.h @@ -20,11 +20,12 @@ #pragma once -#define CL_TARGET_OPENCL_VERSION 210 - #if defined( __APPLE__ ) || defined( __MACOSX ) #include #else + +#define CL_TARGET_OPENCL_VERSION 210 + #include #endif diff --git a/src/opencl/opencl_memory.h b/src/opencl/opencl_memory.h index 532651dd..c34177e0 100644 --- a/src/opencl/opencl_memory.h +++ b/src/opencl/opencl_memory.h @@ -20,11 +20,12 @@ #pragma once -#define CL_TARGET_OPENCL_VERSION 210 - #if defined( __APPLE__ ) || defined( __MACOSX ) #include #else + +#define CL_TARGET_OPENCL_VERSION 210 + #include #endif