thrust

◆ allocate()

template<typename Pointer = void *>
pointer thrust::mr::memory_resource< Pointer >::allocate ( std::size_t  bytes,
std::size_t  alignment = alignof(max_align_t) 
)
inline

Allocates memory of size at least bytes and alignment at least alignment.

Parameters
bytessize, in bytes, that is requested from this allocation
alignmentalignment that is requested from this allocation
Exceptions
thrust::bad_allocwhen no memory with requested size and alignment can be allocated.
Returns
A pointer to void to the newly allocated memory.

Referenced by thrust::mr::memory_resource< device_ptr< void > >::do_is_equal().