chombo-discharge
Loading...
Searching...
No Matches
CD_ParticleMemory.H File Reference

Process-wide accounting of the memory held by particle data. More...

#include <atomic>
#include <cstddef>
#include <memtrack.H>
#include <CD_NamespaceHeader.H>
#include <CD_NamespaceFooter.H>
Include dependency graph for CD_ParticleMemory.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ParticleMemory
 Running totals of the memory held by particle data on this rank.

Enumerations

enum class  ParticleMemory::Kind { ParticleMemory::Container = 0 , ParticleMemory::Buffer = 1 , ParticleMemory::NumKinds = 2 }
 The kinds of particle memory tracked here. See the namespace documentation. More...

Functions

void ParticleMemory::raisePeak (std::atomic< std::size_t > &a_mark, const std::size_t a_value) noexcept
 Raise a high-water mark to a_value unless it is already at least that.
void ParticleMemory::addBytes (const Kind a_kind, const std::size_t a_bytes) noexcept
 Record an allocation.
void ParticleMemory::removeBytes (const Kind a_kind, const std::size_t a_bytes) noexcept
 Record a release.
std::size_t ParticleMemory::getBytes (const Kind a_kind) noexcept
 Get the bytes currently held by one kind.
std::size_t ParticleMemory::getPeak (const Kind a_kind) noexcept
 Get the high-water mark of one kind.
std::size_t ParticleMemory::getAllocatedBytes () noexcept
 Get the bytes currently held by particle data of every kind.
std::size_t ParticleMemory::getPeakBytes () noexcept
 Get the high-water mark across all kinds.

Detailed Description

Process-wide accounting of the memory held by particle data.

Author
Robert Marskar