What are the differences between images and buffers in OpenCL?

I just started learning OpenCL and it seems like images are sort of buffers + added goodies like free bilinear sampling.

Is this correct or are there other differences?

+3


source to share


1 answer


That's right, you get things like (hopefully hardware accelerated), bilinear interpolation, bounding borders, mirroring, or a hold-up color (transparent black). You also get pixel type conversions (the image data could be, for example, half floats or 8-bit, but you return float values ​​that are inverse when written). But you are trading that for direct access, using the pointer or array syntax as you have for the buffer - all image accessibility is done through built-in functions. You can also get texture caching using images, which can speed up the access of neighboring pixels.



+7


source







All Articles