Interpolation

I am looking for functions to implement “Tri-linear interpolation” or “Nearest-neighbor interpolation” working in OpenCL.
I confirmed that the CUDA language natively provides above functions like “cudaFilterModeLinear” within 2D and 3D texture data.

Is there any way other than coding on my own?
Thank you in advance.

I believe OpenCL Image objects utilize these functions.

yes, when creating the sampler, setting the filter_mode to CL_FILTER_LINEAR should enable trilinear filtering.
CL_FILTER_NEAREST will enable nearest neighbor sampling.
you can refer to the volume rendering example in nvidia opencl examples (gpu compuıting sdk)
it seems samplers can be set inside the opencl code as well:

at the beginnig of the volumeRender.cl file the samplers are defined as follows:

[b]#ifdef IMAGE_SUPPORT

sampler_t volumeSampler = CLK_NORMALIZED_COORDS_TRUE | CLK_ADDRESS_CLAMP | CLK_FILTER_LINEAR;
sampler_t transferFuncSampler = CLK_NORMALIZED_COORDS_TRUE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_LINEAR;

#endif[/b]

Thank you all.

I didn’t use the built-in function of image object since the object is not image, but buffer. Therefore, I built it myself.
Anyway thank you.