thrust

◆ do_allocate()

template<typename Upstream>
virtual void_ptr thrust::mr::unsynchronized_pool_resource< Upstream >::do_allocate ( std::size_t  bytes,
std::size_t  alignment = alignof(max_align_t) 
)
inlinevirtual

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.

Implements thrust::mr::memory_resource< Upstream::pointer >.

References thrust::mr::pool_options::alignment, thrust::mr::pool_options::cache_oversized, thrust::mr::pool_options::cached_alignment_cutoff_factor, thrust::mr::pool_options::cached_size_cutoff_factor, thrust::get(), thrust::mr::pool_options::largest_block_size, thrust::mr::pool_options::max_blocks_per_chunk, thrust::mr::pool_options::max_bytes_per_chunk, thrust::mr::pool_options::min_blocks_per_chunk, thrust::mr::pool_options::min_bytes_per_chunk, thrust::raw_reference_cast(), and thrust::mr::pool_options::smallest_block_size.