SyTen

◆ get_from_upper()

int syten::Cuda::CudaAllocator::get_from_upper ( std::int16_t  device,
std::int16_t  idx,
bool  allocate_new_memory 
)
inlineprivate

Ensures that the sized free list of device device at index idx contains at least one element by splitting a block from the upper level or allocating from the OS (if allocate_new_memory is true).

If a new allocation on this device fails, it returns 0, if it succeeds, 1.

References alloc_exp2(), block_pointers, freelist, get_from_upper(), get_memory(), max_size, and std::vector< T >::push_back().

Referenced by alloc(), and get_from_upper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: