Does anybody have sample source code for an OpenCL program for efficiently doing an affine transform to rotate, scale and translate a 2D array/image?
I want to see if I can write a GPU accelerated gpuRot() function to use in place of the IDL rot() function for 2D FITS images, and maybe a few 3D FITS images. The pixel types for these FITS images vary: 16 bit ints, 32 bit ints, 32 bit floats, 64 bit floats, 8 bit ints
And since it is for scientific analysis, I want to preserve the resolution.
I'm sure that I could write something for this in OpenGL (define frame buffer object, set up texture, set up xform matrix, render, read frame buffer object), but am worried about data value integrity and am curious to see how it could/should be done efficiently in OpenCL.
Sample OpenCL code?
Sample OpenGL code (for doing it with a frame buffer object and handling the different data/texture types)?