I would like to write a CUDA kernel that operates on an NPP primitive, so lets say I’ve loaded an image from file like from the examples:
[codebox] // declare a host image object for an 8-bit grayscale image
npp::ImageCPU_8u_C1 oHostSrc;
// load gray-scale image from disk
npp::loadImage(sFilename, oHostSrc);
// declara a device image and copy construct from the host image,
// i.e. upload host to device
npp::ImageNPP_8u_C1 oDeviceSrc(oHostSrc);[/codebox]
Now the image is uploaded to the GPU. I would now like to have a CUDA kernel (in .cu file), that operates on the image, preferably using texture lookups (tex2D). I can’t see how I can get a relevant handle on the uploaded image from the NPP interfaces & the examples don’t appear to show anything like that. Maybe I’m missing a trick…