diff options
Diffstat (limited to 'kernels')
-rw-r--r-- | kernels/runtime_use_host_ptr_image.cl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernels/runtime_use_host_ptr_image.cl b/kernels/runtime_use_host_ptr_image.cl new file mode 100644 index 00000000..7596ec81 --- /dev/null +++ b/kernels/runtime_use_host_ptr_image.cl @@ -0,0 +1,10 @@ +__kernel void +runtime_use_host_ptr_image(__read_only image2d_t src, __write_only image2d_t dst) +{ + const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_NONE | CLK_FILTER_NEAREST; + int2 coord; + coord.x = (int)get_global_id(0); + coord.y = (int)get_global_id(1); + float4 data = read_imagef(src, sampler, coord); + write_imagef(dst, coord, data); +} |