cuda array and npp

Hello everybody,

I’m new with cuda, and I have a question about cuda surface and npp.

I have some mathematical functions to write, to be fast I need to read data from texture and write result using a surface, I only find on cuda documentation that is possible to bind a surface to an Array “cudaBindSurfaceToArray” (not a memory pointer), so in my application I use Array for texture reading and surface writing.

(For information I don’t find a mean to ubind an Array from a surface, maybe there is a function like “cudaUnbindTexture”)

To not write all the mathematical functions myself, I plan to use some functions from npp, but I d’ont find the way to send a cudaArray to npp, I can’t maybe use pointer on cudaArray, but I don’t know how to get the pitch of my yhe cuda array.

I know it’s possible to create a useless kernel to copy data from a cuda array to a memory pointer, but with this kind of kernel I will lose some time…

So my question is, how it’s possible to send a cuda array to npp, or how to use a surface with a memory pointer (not a cudaArray).

Best regards and thanks.

For information, I use a GTX460.

Thanks for your interest in NPP. As you have already figured out, NPP is not designed to work with arrays or textures directly.

ok, thank you, I understand, I think nvidia don’t plan to modify npp to work with cuda array but according with my understanding, the surfaces are relativaly news, do you know if nvida plans to support image pointer for surface in the future or if it’s technically not possible.

If it’s planned I will begin to use memory pointer reading data on textures and write by using global memory (no surface) and change my application when surface writing using memory pointer will be availables.