Would texture memory or constant memory be better for my application?
I need to store a 2D array (matrix) that threads will access many times, but the access pattern will be unpredictable (basically random access, I believe). Each thread will access one data value at a time. Each entry of the matrix will likely be an 8-bit signed integer, and the matrix will be on the order of 23X23. The data will only be read, but will be read several times by each block of the kernel.
This matrix will be a substitution matrix (or scoring matrix) as used in the Smith-Waterman protein sequence alignment algorithm.
Because I will be accessing the matrix randomly, I’m not sure if either constant memory or texture memory has an advantage.