Ginkgo  Generated from pipelines/3035309441 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | List of all members
gko::UmpireAllocatorBase Class Reference

Common base of the Umpire-backed allocators, which forward to a named allocator in Umpire's ResourceManager. More...

#include <ginkgo/core/base/memory.hpp>

Inheritance diagram for gko::UmpireAllocatorBase:
[legend]

Public Member Functions

const std::string & get_name () const
 Name of the underlying Umpire allocator.
 
size_type get_current_size () const
 Bytes currently allocated from the Umpire allocator and not yet deallocated, by any of its users (not only through this object).
 
size_type get_actual_size () const
 Bytes the Umpire allocator holds from its memory resource. More...
 
size_type get_high_watermark () const
 Largest value get_current_size() has reached so far.
 
size_type get_allocation_count () const
 Number of allocations from the Umpire allocator that are still live.
 
void release ()
 Returns the pool's completely unused blocks to its memory resource.
 

Detailed Description

Common base of the Umpire-backed allocators, which forward to a named allocator in Umpire's ResourceManager.

Warning
Pools are not stream-ordered: deallocate() frees immediately while Ginkgo's kernels may still use the memory. Call Executor::synchronize() before sharing a device pool across streams.

Member Function Documentation

◆ get_actual_size()

size_type gko::UmpireAllocatorBase::get_actual_size ( ) const

Bytes the Umpire allocator holds from its memory resource.

For a pool, this includes reserved memory that is not currently allocated, so it is at least get_current_size().


The documentation for this class was generated from the following file: