CUDAでボリュームテクスチャのシフト操作を実装したい。cudaArray内のデータをある位置から別の位置に移動するmemcpy操作を数回繰り返す実装を考えました。
常に無効な引数エラーが発生するため、何が間違っていますか?これが私がしていることのスケッチです:
/* My volume texture */
cudaArray* g_pVolumeTexture // its size is 256^3 voxels of type uchar2
...
cudaMemcpy3DParms prms;
prms.srcArray = g_pVolumeTexture;
prms.dstArray = g_pVolumeTexture; // src = dst, because I wanna rather shift than
// copy
prms.extent = make_cudaExtent(24, 256, 256);
prms.srcPos = make_cudaPos(0, 0, 0);
prms.dstPos = make_cudaPos(48, 0, 0); // this will mean a move of 48 voxels in
// x-direction; the piece of data moved
// measures 24 voxels in x-direction
cudaMemcpy3D(&prms);
// Here cudaGetLastError always returns 'invalid argument error'