GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
gridfire::MultiscalePartitioningEngineView::CacheStats Struct Reference

Struct for tracking cache statistics. More...

## Public Types
enum class | operators { CalculateRHSAndEnergy , GenerateJacobianMatrix , CalculateMolarReactionFlow , GetSpeciesTimescales , GetSpeciesDestructionTimescales , Other , All }

## Public Member Functions
void | hit (const operators op=operators::Other)
| Increments the hit counter for a given operator.
void | miss (const operators op=operators::Other)
| Increments the miss counter for a given operator.
size_t | hits (const operators op=operators::All) const
| Gets the number of hits for a specific operator or all operators.
size_t | misses (const operators op=operators::All) const
| Gets the number of misses for a specific operator or all operators.

## Public Attributes
std::map< operators,std::string > | operatorsNameMap
| Map from operators to their string names for logging.
size_t | m_hit = 0
| Total number of cache hits.
size_t | m_miss = 0
| Total number of cache misses.
std::map< operators,size_t > | m_operatorHits
| Map from operators to the number of cache hits for that operator.
std::map< operators,size_t > | m_operatorMisses
| Map from operators to the number of cache misses for that operator.

## Detailed Description

Struct for tracking cache statistics.

@purpose A simple utility to monitor the performance of the QSE cache by counting hits and misses for various engine operations.

Definition at line 822 of file engine_multiscale.h.

## Member Enumeration Documentation

## ◆ operators

enum class gridfire::MultiscalePartitioningEngineView::CacheStats::operators
| strong

Enumerator
CalculateRHSAndEnergy |
GenerateJacobianMatrix |
CalculateMolarReactionFlow |
GetSpeciesTimescales |
GetSpeciesDestructionTimescales |
Other |
All |

Definition at line 823 of file engine_multiscale.h.

## Member Function Documentation

## ◆ hit()

void gridfire::MultiscalePartitioningEngineView::CacheStats::hit | ( | const operators | op = operators::Other | ) |

Increments the hit counter for a given operator.

Parameters

  op | The operator that resulted in a cache hit.

Exceptions

  std::invalid_argument | if `op` is `All`.

Definition at line 1612 of file engine_multiscale.cpp.

## ◆ hits()

size_t gridfire::MultiscalePartitioningEngineView::CacheStats::hits | ( | const operators | op = operators::All | ) | const
| nodiscard

Gets the number of hits for a specific operator or all operators.

Parameters

  op | The operator to get the number of hits for. Defaults to `All`.

Returns
  The number of hits.

Definition at line 1629 of file engine_multiscale.cpp.

## ◆ miss()

void gridfire::MultiscalePartitioningEngineView::CacheStats::miss | ( | const operators | op = operators::Other | ) |

Increments the miss counter for a given operator.

Parameters

  op | The operator that resulted in a cache miss.

Exceptions

  std::invalid_argument | if `op` is `All`.

Definition at line 1620 of file engine_multiscale.cpp.

## ◆ misses()

size_t gridfire::MultiscalePartitioningEngineView::CacheStats::misses | ( | const operators | op = operators::All | ) | const
| nodiscard

Gets the number of misses for a specific operator or all operators.

Parameters

  op | The operator to get the number of misses for. Defaults to `All`.

Returns
  The number of misses.

Definition at line 1636 of file engine_multiscale.cpp.

## Member Data Documentation

## ◆ m_hit

size_t gridfire::MultiscalePartitioningEngineView::CacheStats::m_hit = 0

Total number of cache hits.

Definition at line 848 of file engine_multiscale.h.

## ◆ m_miss

size_t gridfire::MultiscalePartitioningEngineView::CacheStats::m_miss = 0

Total number of cache misses.

Definition at line 852 of file engine_multiscale.h.

## ◆ m_operatorHits

std::map<operators, size_t> gridfire::MultiscalePartitioningEngineView::CacheStats::m_operatorHits

Initial value:
= {
{operators::CalculateRHSAndEnergy, 0},
{operators::GenerateJacobianMatrix, 0},
{operators::CalculateMolarReactionFlow, 0},
{operators::GetSpeciesTimescales, 0},
{operators::GetSpeciesDestructionTimescales, 0},
{operators::Other, 0}
}
gridfire::MultiscalePartitioningEngineView::CacheStats::operators::CalculateMolarReactionFlow
@ CalculateMolarReactionFlow
Definition engine_multiscale.h:826
gridfire::MultiscalePartitioningEngineView::CacheStats::operators::Other
@ Other
Definition engine_multiscale.h:829
gridfire::MultiscalePartitioningEngineView::CacheStats::operators::GetSpeciesTimescales
@ GetSpeciesTimescales
Definition engine_multiscale.h:827
gridfire::MultiscalePartitioningEngineView::CacheStats::operators::GenerateJacobianMatrix
@ GenerateJacobianMatrix
Definition engine_multiscale.h:825
gridfire::MultiscalePartitioningEngineView::CacheStats::operators::GetSpeciesDestructionTimescales
@ GetSpeciesDestructionTimescales
Definition engine_multiscale.h:828
gridfire::MultiscalePartitioningEngineView::CacheStats::operators::CalculateRHSAndEnergy
@ CalculateRHSAndEnergy
Definition engine_multiscale.h:824

Map from operators to the number of cache hits for that operator.

Definition at line 857 of file engine_multiscale.h.

## ◆ m_operatorMisses

std::map<operators, size_t> gridfire::MultiscalePartitioningEngineView::CacheStats::m_operatorMisses

Initial value:
= {
{operators::CalculateRHSAndEnergy, 0},
{operators::GenerateJacobianMatrix, 0},
{operators::CalculateMolarReactionFlow, 0},
{operators::GetSpeciesTimescales, 0},
{operators::GetSpeciesDestructionTimescales, 0},
{operators::Other, 0}
}

Map from operators to the number of cache misses for that operator.

Definition at line 869 of file engine_multiscale.h.

## ◆ operatorsNameMap

std::map<operators, std::string> gridfire::MultiscalePartitioningEngineView::CacheStats::operatorsNameMap

Initial value:
= {
{operators::CalculateRHSAndEnergy, "calculateRHSAndEnergy"},
{operators::GenerateJacobianMatrix, "generateJacobianMatrix"},
{operators::CalculateMolarReactionFlow, "calculateMolarReactionFlow"},
{operators::GetSpeciesTimescales, "getSpeciesTimescales"},
{operators::GetSpeciesDestructionTimescales, "getSpeciesDestructionTimescales"},
{operators::Other, "other"}
}

Map from operators to their string names for logging.

Definition at line 836 of file engine_multiscale.h.

The documentation for this struct was generated from the following files:

- src/include/gridfire/engine/views/engine_multiscale.h
- src/lib/engine/views/engine_multiscale.cpp