Files
kernels/tests/opencl/sharedmem/kernel.cl
2024-01-01 14:26:19 -08:00

14 lines
324 B
Common Lisp

__kernel void sharedmem (__global volatile const float *src,
__global volatile float *dst,
__local volatile float *smem)
{
int gid = get_global_id(0);
smem[gid] = src[gid];
float read;
__attribute__((opencl_unroll_hint))
for (int i = 0; i < 5000; i++) {
read = smem[gid];
}
dst[gid] = read;
}