I am sure it is not yet possible to use thrust :: host_vector as a distributed host allocation. There is a designated memory allocator, but I do not believe that available memory is available. What you need to do is something like this:
cudaHostAlloc
mapped memory with cudaHostAlloc
application- Get device pointer for null copy using
cudaHostGetDevicePointer
- Create
thrust::device_ptr
using thrust::device_pointer_cast
on this device pointer (see here for more information)
You can either make thrust::device_vector
with thrust::device_ptr
, or dirctly pass thrust::device_ptr
any algorithms that accept an iterator.
source share