thrust::device_pointer_cast

Defined in thrust/device_ptr.h

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

Create a device_ptr from a raw pointer.

Template Parameters

T – Any type.

Parameters

ptr – A raw pointer to a T in device memory.

Pre

ptr points to a location in device memory.

Returns

A device_ptr<T> pointing to ptr.