return()
endif()
-# Prevent warnings when linking against OpenCL > 1.1
-if (OPENCL_VERSION_STRING VERSION_GREATER 1.1)
- set(OPENCL_DEFINITIONS "-DCL_USE_DEPRECATED_OPENCL_1_1_APIS")
-endif()
-
# Tell compiler to hide warnings for comments caused by cl_gl_ext.h on Linux
if (UNIX)
set(OPENCL_DEFINITIONS ${OPENCL_DEFINITIONS} " -Wno-comment")
add_definitions(${OPENCL_DEFINITIONS})
-
-#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
-
include_directories(${OPENCL_INCLUDE_DIRS})
macro(gmx_gpu_setup)
cl_int gmx_unused cl_error;
/* Enqueue wait */
+#ifdef CL_VERSION_1_2
+ cl_error = clEnqueueBarrierWithWaitList(stream, 1, ocl_event, NULL);
+#else
cl_error = clEnqueueWaitForEvents(stream, 1, ocl_event);
+#endif
assert(CL_SUCCESS == cl_error);
{
if (iloc == eintLocal)
{
+#ifdef CL_VERSION_1_2
+ cl_error = clEnqueueMarkerWithWaitList(stream, 0, NULL, &(nb->misc_ops_done));
+#else
cl_error = clEnqueueMarker(stream, &(nb->misc_ops_done));
+#endif
assert(CL_SUCCESS == cl_error);
}
else
data back first. */
if (iloc == eintNonlocal)
{
+#ifdef CL_VERSION_1_2
+ cl_error = clEnqueueMarkerWithWaitList(stream, 0, NULL, &(nb->nonlocal_done));
+#else
cl_error = clEnqueueMarker(stream, &(nb->nonlocal_done));
+#endif
assert(CL_SUCCESS == cl_error);
}