File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
samples/17_concurrentdispatch Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -56,16 +56,22 @@ clGetKernelMaxConcurrentWorkGroupCountINTEL(
56
56
#endif // !defined(cl_intel_concurrent_dispatch)
57
57
58
58
static const char kernelString[] = R"CLC(
59
- #pragma OPENCL EXTENSION cl_intel_concurrent_dispatch : enable
59
+ //#pragma OPENCL EXTENSION cl_intel_concurrent_dispatch : enable
60
+ bool __attribute__((overloadable)) intel_is_device_barrier_valid();
61
+ void __attribute__((overloadable)) intel_device_barrier(
62
+ cl_mem_fence_flags flags);
63
+ void __attribute__((overloadable)) intel_device_barrier(
64
+ cl_mem_fence_flags flags,
65
+ memory_scope scope);
60
66
kernel void DeviceBarrierTest( global uint* dst )
61
67
{
62
68
const size_t gws = get_global_size(0);
63
69
atomic_add( &dst[gws], 1 );
64
70
65
- // if (intel_is_device_barrier_valid()) {
66
- // intel_device_barrier( CLK_LOCAL_MEM_FENCE ); // TODO: check fence flags
67
- // intel_device_barrier( CLK_LOCAL_MEM_FENCE , memory_scope_device ); // TODO: check fence flags
68
- // }
71
+ if (intel_is_device_barrier_valid()) {
72
+ intel_device_barrier( CLK_GLOBAL_MEM_FENCE ); // TODO: check fence flags
73
+ intel_device_barrier( CLK_GLOBAL_MEM_FENCE , memory_scope_device ); // TODO: check fence flags
74
+ }
69
75
70
76
const uint id = get_global_id(0);
71
77
dst[id] = dst[gws] + 1;
You can’t perform that action at this time.
0 commit comments