thrust::device_new
Defined in thrust/device_new.h
-
template<typename T>
device_ptr<T> thrust::device_new(const size_t n = 1) device_new
implements the new operator for types resident in device memory. It allocates device memory large enough to holdn
new objects of typeT
.- Parameters
n – The number of objects to allocate. Defaults to
1
.- Returns
A
device_ptr
to the newly allocated region of device memory.