How to read back a CUDA Texture for testing?
问题 Ok, so far, I can create an array on the host computer (of type float), and copy it to the gpu, then bring it back to the host as another array (to test if the copy was successful by comparing to the original). I then create a CUDA array from the array on the GPU. Then I bind that array to a CUDA texture. I now want to read that texture back and compare with the original array (again to test that it copied correctly). I saw some sample code that uses the readTexel() function shown below. It