Template Function thrust::device_new(device_ptr<void>, const T&, const size_t)¶
Function Documentation¶
-
template<typename
T
>
device_ptr<T>thrust
::
device_new
(device_ptr<void> p, const T &exemplar, const size_t n = 1) device_new
implements the placement new operator for types resident in device memory.device_new
callsT
’s copy constructor on a array of objects in device memory. No memory is allocated by this function.- Return
p, casted to
T
’s type.- See
- See
fill
- Parameters
p
: Adevice_ptr
to a region of device memory into which to construct one or manyT
s.exemplar
: The value from which to copy.n
: The number of objects to construct atp
.