title: CUDA: how to read 4 (or 16) chars in one transaction per thread using textures and char4 (or int4)?
body: <p>I have a large character array in the device global memory that is accessed
  in a coalescent manner by threads. I've read somewhere that I could speed up
  memory access by reading 4 or 16 chars in one memory transaction per thread.
  I believe I would have to use textures and the char4 or int4 structs. However,
  I can't find any documentation or examples on this. Could anyone here please
  provide a simple example or pointers to where I can learn more about this?</p>
  
  <p>In my code I define the char array as</p>
  
  <pre><code>char *database = NULL;
  cudaMalloc( (void**) &amp;database, SIZE * sizeof(char) );
  </code></pre>
  
  <p>What would the definition be if I want to use textures and char4 (or int4)? </p>
  
  <p>Thanks very much.</p>