I am very new to OpenCL and I have a question about how samplers are dealt with.

I am dealing mostly with 3D images and as I understand it, I have to do the following:

- Create an image with createImage3D and then say all I want to do is interpolate the image using some transformation, then I create a sampler object and associate it with this 3D image and I can have continuous indexing.

I am guessing on the GPU, the sampler object binds the image to a texture and can use the hardware accelerated interpolation operations available on the GPU. But what does OpenCL do when the underlying hardware is a multicore CPU? Can a sampler image be even used? I cannot test it at the moment as my OpenCL code crashes on my Macbook Air

Also, another question that does the sampler object have a lot of memory overhead (does it replicate the data). I am trying to design an abstract image class where once the user creates an image there will be a sampler automatically associated with it, so that the resampling can be done. However, i wonder if i should create the sampler as needed and then release it.

These questions might be quite n00b and I am sorry for that. However, i would be really grateful if someone can help me with these doubts.

Many thanks,