Template Function thrust::device_new(device_ptr<void>, const size_t)¶
Defined in File device_new.h
Function Documentation¶
-
template<typename
T>
device_ptr<T>thrust::device_new(device_ptr<void> p, const size_t n = 1) device_newimplements the placementnewoperator for types resident in device memory.device_newcallsT’s null constructor on a array of objects in device memory. No memory is allocated by this function.- Return
p, casted to
T’s type.- See
- Parameters
p: Adevice_ptrto a region of device memory into which to construct one or manyTs.n: The number of objects to construct atp.