|
UMPIRE
Umpire: resource management and provision
|
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/strategy/DeviceIpcAllocator.hpp>

Public Member Functions | |
| DeviceIpcAllocator (const std::string &name, int id) noexcept | |
| DeviceIpcAllocator (const std::string &name, int id, Allocator device_allocator, MemoryResourceTraits::shared_scope scope, std::size_t shared_memory_size=1024 *1024) noexcept | |
| ~DeviceIpcAllocator () | |
| void * | allocate (std::size_t bytes) override |
| Allocate bytes of memory. More... | |
| void | deallocate (void *ptr, std::size_t size=0) override |
| Free the memory at ptr. More... | |
| Platform | getPlatform () noexcept override |
| Get the platform associated with this AllocationStrategy. More... | |
| MemoryResourceTraits | getTraits () const noexcept override |
| MPI_Comm | get_scope_communicator () |
| void * | allocate_internal (std::size_t bytes) |
| void * | allocate_named_internal (const std::string &name, std::size_t bytes) |
| void | deallocate_internal (void *ptr, std::size_t size=0) |
| virtual void | release () |
| Release any and all unused memory held by this AllocationStrategy. More... | |
| virtual std::size_t | getCurrentSize () const noexcept |
| Get current (total) size of the allocated memory. More... | |
| virtual std::size_t | getHighWatermark () const noexcept |
| Get the high watermark of the total allocated size. More... | |
| virtual std::size_t | getActualSize () const noexcept |
| Get the current amount of memory allocated by this allocator. More... | |
| virtual std::size_t | getAllocationCount () const noexcept |
| Get the total number of active allocations by this allocator. More... | |
| const std::string & | getName () noexcept |
| Get the name of this AllocationStrategy. More... | |
| const std::string & | getStrategyName () const noexcept |
| int | getId () noexcept |
| Get the id of this AllocationStrategy. More... | |
| virtual AllocationStrategy * | getParent () const noexcept |
| Traces where the allocator came from. More... | |
| virtual bool | tracksMemoryUse () const noexcept |
| bool | isTracked () const noexcept |
Public Attributes | |
| std::size_t | m_current_size {0} |
| std::size_t | m_high_watermark {0} |
| std::size_t | m_allocation_count {0} |
Protected Member Functions | |
| void | setTracking (bool) noexcept |
Protected Attributes | |
| std::string | m_name |
| std::string | m_strategy_name |
| int | m_id |
| bool | m_tracked {true} |
| AllocationStrategy * | m_parent |
|
noexcept |
|
noexcept |
| umpire::strategy::DeviceIpcAllocator::~DeviceIpcAllocator | ( | ) |
|
overridevirtual |
Allocate bytes of memory.
| bytes | Number of bytes to allocate. |
Implements umpire::strategy::AllocationStrategy.
References umpire::util::message::Debug, UMPIRE_ERROR, and UMPIRE_LOG.
|
overridevirtual |
Free the memory at ptr.
| ptr | Pointer to free. |
Implements umpire::strategy::AllocationStrategy.
References umpire::strategy::AllocationStrategy::deallocate_internal(), umpire::util::message::Debug, gpuError, gpuGetErrorString, gpuIpcCloseMemHandle, gpuSuccess, UMPIRE_ERROR, and UMPIRE_LOG.
|
overridevirtualnoexcept |
Get the platform associated with this AllocationStrategy.
The Platform distinguishes the appropriate place to execute operations on memory allocated by this AllocationStrategy.
Implements umpire::strategy::AllocationStrategy.
References umpire::strategy::AllocationStrategy::getPlatform().
|
overridevirtualnoexcept |
Reimplemented from umpire::strategy::AllocationStrategy.
References umpire::strategy::AllocationStrategy::getTraits(), and umpire::MemoryResourceTraits::scope.
| MPI_Comm umpire::strategy::DeviceIpcAllocator::get_scope_communicator | ( | ) |
|
inherited |
References umpire::strategy::AllocationStrategy::m_allocation_count, umpire::strategy::AllocationStrategy::m_current_size, and umpire::strategy::AllocationStrategy::m_high_watermark.
Referenced by umpire::strategy::mixins::AlignedAllocation::aligned_allocate(), umpire::strategy::AlignedAllocator::allocate(), umpire::strategy::AllocationAdvisor::allocate(), umpire::strategy::AllocationPrefetcher::allocate(), umpire::strategy::MixedPool::allocate(), umpire::strategy::NamedAllocationStrategy::allocate(), umpire::strategy::NumaPolicy::allocate(), umpire::strategy::SizeLimiter::allocate(), umpire::strategy::SlotPool::allocate(), umpire::strategy::ThreadSafeAllocator::allocate(), and umpire::strategy::MonotonicAllocationStrategy::MonotonicAllocationStrategy().
|
inherited |
References umpire::strategy::AllocationStrategy::m_allocation_count, umpire::strategy::AllocationStrategy::m_current_size, and umpire::strategy::AllocationStrategy::m_high_watermark.
Referenced by umpire::strategy::NamingShim::allocate(), and umpire::strategy::NamedAllocationStrategy::allocate_named().
|
inherited |
References umpire::strategy::AllocationStrategy::m_allocation_count, and umpire::strategy::AllocationStrategy::m_current_size.
Referenced by umpire::strategy::mixins::AlignedAllocation::aligned_deallocate(), umpire::strategy::AlignedAllocator::deallocate(), umpire::strategy::AllocationAdvisor::deallocate(), umpire::strategy::AllocationPrefetcher::deallocate(), umpire::strategy::MixedPool::deallocate(), umpire::strategy::NamedAllocationStrategy::deallocate(), umpire::strategy::NamingShim::deallocate(), umpire::strategy::NumaPolicy::deallocate(), umpire::strategy::SizeLimiter::deallocate(), umpire::strategy::ThreadSafeAllocator::deallocate(), deallocate(), ~DeviceIpcAllocator(), umpire::strategy::MonotonicAllocationStrategy::~MonotonicAllocationStrategy(), and umpire::strategy::SlotPool::~SlotPool().
|
virtualinherited |
Release any and all unused memory held by this AllocationStrategy.
Reimplemented in umpire::strategy::FixedPool, umpire::strategy::ResourceAwarePool, umpire::strategy::QuickPool, umpire::strategy::MixedPool, and umpire::strategy::DynamicPoolList.
References umpire::util::message::Info, and UMPIRE_LOG.
Referenced by umpire::Allocator::release().
|
virtualnoexceptinherited |
Get current (total) size of the allocated memory.
This is the total size of all allocation currently 'live' that have been made by this AllocationStrategy object.
Reimplemented in umpire::strategy::FixedPool, umpire::strategy::MonotonicAllocationStrategy, umpire::resource::SyclDeviceMemoryResource< _allocator >, umpire::resource::NullMemoryResource, umpire::resource::NoOpMemoryResource, and umpire::resource::FileMemoryResource.
References umpire::strategy::AllocationStrategy::m_current_size.
Referenced by umpire::strategy::AllocationStrategy::getActualSize(), and umpire::Allocator::getCurrentSize().
|
virtualnoexceptinherited |
Get the high watermark of the total allocated size.
This is equivalent to the highest observed value of getCurrentSize.
Reimplemented in umpire::strategy::FixedPool, umpire::strategy::MonotonicAllocationStrategy, umpire::resource::SyclDeviceMemoryResource< _allocator >, umpire::resource::NullMemoryResource, umpire::resource::NoOpMemoryResource, and umpire::resource::FileMemoryResource.
References umpire::strategy::AllocationStrategy::m_high_watermark.
Referenced by umpire::Allocator::getHighWatermark().
|
virtualnoexceptinherited |
Get the current amount of memory allocated by this allocator.
Note that this can be larger than getCurrentSize(), particularly if the AllocationStrategy implements some kind of pooling.
Reimplemented in umpire::strategy::FixedPool, umpire::strategy::ResourceAwarePool, umpire::strategy::QuickPool, umpire::strategy::MixedPool, umpire::strategy::DynamicPoolList, and umpire::resource::HostSharedMemoryResource.
References umpire::strategy::AllocationStrategy::getCurrentSize().
Referenced by umpire::Allocator::getActualSize().
|
virtualnoexceptinherited |
Get the total number of active allocations by this allocator.
References umpire::strategy::AllocationStrategy::m_allocation_count.
Referenced by umpire::Allocator::getAllocationCount().
|
noexceptinherited |
Get the name of this AllocationStrategy.
References umpire::strategy::AllocationStrategy::m_name.
Referenced by umpire::strategy::DynamicPoolList::coalesce(), umpire::strategy::QuickPool::coalesce(), umpire::strategy::ResourceAwarePool::coalesce(), umpire::strategy::mixins::Inspector::deregisterAllocation(), umpire::ResourceManager::destroyAllocator(), DynamicSizePool< IA >::DynamicSizePool(), umpire::Allocator::getName(), and umpire::util::unwrap_allocation_strategy().
|
noexceptinherited |
References umpire::strategy::AllocationStrategy::m_strategy_name.
Referenced by umpire::Allocator::getStrategyName().
|
noexceptinherited |
Get the id of this AllocationStrategy.
References umpire::strategy::AllocationStrategy::m_id.
Referenced by umpire::ResourceManager::destroyAllocator(), and umpire::Allocator::getId().
|
virtualnoexceptinherited |
Traces where the allocator came from.
References umpire::strategy::AllocationStrategy::m_parent.
Referenced by umpire::ResourceManager::destroyAllocator(), umpire::Allocator::getParent(), and umpire::is_accessible().
|
virtualnoexceptinherited |
Reimplemented in umpire::strategy::ResourceAwarePool, umpire::strategy::QuickPool, and umpire::strategy::DynamicPoolList.
|
noexceptinherited |
References umpire::strategy::AllocationStrategy::m_tracked.
Referenced by umpire::Allocator::isTracked().
|
protectednoexceptinherited |
|
inherited |
Referenced by umpire::strategy::AllocationStrategy::allocate_internal(), umpire::strategy::AllocationStrategy::allocate_named_internal(), umpire::strategy::AllocationStrategy::deallocate_internal(), umpire::strategy::mixins::Inspector::deregisterAllocation(), umpire::strategy::AllocationStrategy::getCurrentSize(), and umpire::strategy::mixins::Inspector::registerAllocation().
|
inherited |
|
inherited |
Referenced by umpire::strategy::AllocationStrategy::allocate_internal(), umpire::strategy::AllocationStrategy::allocate_named_internal(), umpire::strategy::AllocationStrategy::deallocate_internal(), umpire::strategy::mixins::Inspector::deregisterAllocation(), umpire::strategy::AllocationStrategy::getAllocationCount(), and umpire::strategy::mixins::Inspector::registerAllocation().
|
protectedinherited |
|
protectedinherited |
Referenced by umpire::strategy::AllocationStrategy::getStrategyName().
|
protectedinherited |
Referenced by umpire::strategy::AllocationStrategy::getId().
|
protectedinherited |
Referenced by umpire::strategy::AllocationStrategy::isTracked().
|
protectedinherited |
Referenced by umpire::strategy::AllocationStrategy::getParent().