xcl_zero_global_work_offset
Description
If you use clEnqueueNDRangeKernel
with the
global_work_offset
set to NULL or all zeros, you can use
this attribute to tell the compiler that the global_work_offset
is always zero.
This attribute can improve memory performance when you have memory accesses
like:
A[get_global_id(x)] = ...;
Note: You can specify
reqd_work_group_size
,
vec_type_hint
, and xcl_zero_global_work_offset
together
to maximize performance.Syntax
Place this attribute before the kernel definition, or before the primary
function specified for the kernel:
__kernel __attribute__((xcl_zero_global_work_offset))
void test (__global short *input, __global short *output, __constant short *constants) { }
See Also
- reqd_work_group_size
- vec_type_hint
- clEnqueueNDRangeKernel
- SDAccel Environment Profiling and Optimization Guide (UG1207)