When to use the constant memory?

I was told to use texture memory whenever it’s possible to speedup my fetches by using the data cache. However, cosntant memory accesses are also cached. So my question is: how do I decide to use one type or another (texture or constant memory)?


If each thread within warp reads same memory location (or maybe two different locations per warp) then use constant memory. Otherwise it’s better to experiment a bit, but texture cache is likely to be faster.