7得票1回答
我能使用thrust::host_vector吗?还是必须使用cudaHostAlloc来实现Thrust的零拷贝?

我想通过使用cudaHostGetDevicePointer在映射内存上进行零拷贝。我可以使用thrust::host_vector吗?还是必须使用cudaHostAlloc(..., cudaHostAllocMapped)?或者用Thrust更容易实现?