Use texture memory or global memory in this case?

Hi, I am new to CUDA and I need to do some post processing on CT volume data. My workflow is simply first smoothing the volume(Gaussian low-pass) and then some other processing.

Then, what memory should I use to store the original CT volume and the smoothed CT volume, 3D texture or global memory? Seems the texture memory will be faster from the programming guider, but I just use the original data one time as input in smoothing, should I use global memory instead? And for the smoothed data I will access it many times, but I need to write it in the generating phase, can I use texture memory to store it?

Thank you.

I think I should use global memory or cuda array for the original data, and use cuda array for the smoothed data. After I generating the smoothed data, I make it a texture and use it.

Am I right?

If you only access the data once, using a texture for it is not likely to give much benefit. There may still be some small benefit depending on your access pattern, because texture cache has a different spatial organization than ordinary L1/L2.

For the smoothed data, where you need to read it and write it, you could try using CUDA surface memory (texturing is a read-only process). Surfaces are covered in the programming guide, there are sample codes for it, and questions about it such as here:

Whether or not surface will give any benefit over ordinary global storage, I can’t say. It depends on your actual code and access patterns.

Thanks a lot. I will have a try of the surface.