Reputation: 53
What's the difference between global memory and texture in CUDA? To speed up memory copying from host to device, which one is better? I am going to use them for Image Processing. I've seen the sample for bilateral filtering. It used texture instead of global memory.
I'd like some to explain about it. Thanks.
Upvotes: 3
Views: 1289
Reputation: 2870
Texture memory is referred to a hardware unit that maps onto global memory.
Performing copy between host memory and GPU memory is always done with global memory involved it does not matter if a texture unit is mapped onto that piece of global memory or not.
You can read more about texture memory in CUDA programming guide
Bilateral filtering Sample uses texture unit to increase memory throughput by utilizing Texture unit caching mechanism.
Benefits of using texture memory:
Upvotes: 2