diff options
Diffstat (limited to 'src/kernels/cl_internal_fill_image_1d_array.cl')
-rw-r--r-- | src/kernels/cl_internal_fill_image_1d_array.cl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/kernels/cl_internal_fill_image_1d_array.cl b/src/kernels/cl_internal_fill_image_1d_array.cl new file mode 100644 index 00000000..f1eb2412 --- /dev/null +++ b/src/kernels/cl_internal_fill_image_1d_array.cl @@ -0,0 +1,15 @@ +kernel void __cl_fill_image_1d_array( __write_only image1d_array_t image, float4 pattern, + unsigned int region0, unsigned int region1, unsigned int region2, + unsigned int origin0, unsigned int origin1, unsigned int origin2) +{ + int i = get_global_id(0); + int j = get_global_id(1); + int k = get_global_id(2); + int2 coord; + if((i >= region0) || (j>= region1) || (k>=region2)) + return; + coord.x = origin0 + i; + coord.y = origin2 + k; + write_imagef(image, coord, pattern); + +} |