I need to access non-contiguous locations in an image (a sliding square window of n x n pixels for n > 5 overlaid on an image that's between SDTV and HDTV resolutions). I'd like to use OpenCL on a Mac for this, but CL_FALSE is returned when I query the ATI 5670 card on my iMac for CL_DEVICE_IMAGE_SUPPORT. The options I can think of right now are to
1) Eat the cost of noncontiguous access on a GPU (or CPU) when using 2D data buffers in Apple's OpenCL implementation. Implement my own version of CLK_FILTER_LINEAR/CLK_ADDRESS_CLAMP_TO_EDGE for my 2D data buffers. Or use a 1D data buffer. In either case, the kernels will be accessing memory locations from -n//2 to n/2 around each pixel, where each pixel is my kernel's get_global_i开发者_开发问答d().
2) Use the CPU device for images (but Intel CPUs are "extremely" slow to emulate image support, right?)
3) Install Windows? Does anyone know if Boot Camp includes a driver that will allow for Stream computing? Or use rEFIt to get linux running on here?
Is there an option I'm forgetting, or am I just stuck with the wrong tool for the job?
精彩评论