How to read back a CUDA Texture for testing?

前端 未结 2 1304
再見小時候
再見小時候 2020-12-15 01:03

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 succ

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-15 01:42

    readTexels() is a kernel (__global__) function, i.e. it runs on the GPU. Therefore you need to use the correct syntax to launch a kernel.

    Take a look through the CUDA Programming Guide and some of the SDK samples, both available via the NVIDIA CUDA site to see how to launch a kernel.

    Hint: It'll end up something like readTexels<<>>(...)

提交回复
热议问题