PyCuda を使用して GPU に既にある配列をテクスチャにバインドする方法はありますか?
cuda.bind_array_to_texref(cuda.make_multichannel_2d_array(...), texref)
CPU 上の配列をテクスチャにバインドするは既にありますがcudaBindTextureToArray
、配列が既にデバイス上にある場合、PyCuda で同等のものを見つけることができませんでした。たとえば、次のようにします。
myArray = [1, 2, 3]
myArray_d = gpu.to_gpu(myArray) # then performs some computations on it, and then
cuda.bind_texture_to_array(myArray_d, texref)