Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
cudaMallocPitch()3D数组分配和复制有什么对应的方法cudaMemcpy2D()吗?
cudaMallocPitch()
cudaMemcpy2D()
谢谢!
cudaMalloc3D() cudaMalloc3DArray() cudaMemcpy3D()
您还可以通过定义ascudaMallocPitch()来为 3D 数据分配线性设备内存,并在内核中获得合并访问,只要您考虑到返回的音高和一些索引算法。heightheight * depthcudaMallocPitch()
height
height * depth
同样,您可以使用cudaMalloc3D()在设备上分配逻辑 1D、2D 或 3D 内存对象并pitchedDevPtr在内核中使用。
cudaMalloc3D()
pitchedDevPtr