Reputation: 11732
I just started learning OpenCL and it seems that Images are sort of Buffers + added goodies like free bilinear sampling.
Is this right, or are there other differences too?
Upvotes: 3
Views: 259
Reputation: 6333
Right, you get things like (hopefully hardware accelerated) bilinear interpolation, edge bounding, mirroring, or held edge color (transparent black). You also get pixel type conversions (image data can be, say half float or 8-bit, but you get float values back; reverse on write). But you trade that for direct access using pointer or array syntax like you have for buffer - all image access is via built-in functions. You might also get texture caching using images, which can accelerate access of nearby pixels.
Upvotes: 7