Hello,
I discovered this new crate recently, I couldn't find no examples online nor on this repository on how to work with images. A minimalist example that creates an opencl image using Image::create would be helpful enough.
I suggest an example that performs a simple copy given an opencl image as input and image buffer as output.
__kernel void copy_image(__read_only image2d_t input, __write_only image2d_t output) {
int2 pos = (int2)(get_global_id(0), get_global_id(1));
float4 pixel = read_imagef(input, CLK_NORMALIZED_COORDS_FALSE, pos);
write_imagef(output, pos, pixel);
}
Hello,
I discovered this new crate recently, I couldn't find no examples online nor on this repository on how to work with images. A minimalist example that creates an opencl image using
Image::createwould be helpful enough.I suggest an example that performs a simple copy given an opencl image as input and image buffer as output.