Thrust

◆ device_pointer_cast() [1/2]

template<typename T >
__host__ __device__ device_ptr<T> thrust::device_pointer_cast ( T *  ptr)

Create a device_ptr from a raw pointer.

Template Parameters
TAny type.
Parameters
ptrA raw pointer to a T in device memory.
Precondition
ptr points to a location in device memory.
Returns
A device_ptr<T> pointing to ptr.