Peano
Loading...
Searching...
No Matches
benchmarks::exahype2::kernelbenchmarks::DataRepository Class Reference

A singleton repository to manage and provide access to grid cell and face data. More...

#include <DataRepository.h>

Collaboration diagram for benchmarks::exahype2::kernelbenchmarks::DataRepository:

Data Structures

struct  DepthLevel
 
struct  Indexing
 Provides helper functions for calculating linearized array indices from geometric cell positions. More...
 

Public Member Functions

 DataRepository (const DataRepository &)=delete
 
DataRepositoryoperator= (const DataRepository &)=delete
 
 DataRepository (DataRepository &&)=delete
 
DataRepositoryoperator= (DataRepository &&)=delete
 
 ~DataRepository ()=default
 
double * getCellQ (const tarch::la::Vector< DIMENSIONS, double > &cellCentre, const tarch::la::Vector< DIMENSIONS, double > &cellSize)
 
double * getCellQReconstructed (const tarch::la::Vector< DIMENSIONS, double > &cellCentre, const tarch::la::Vector< DIMENSIONS, double > &cellSize)
 
double * getFaceQNew (int index, int depth, int axis)
 
double * getFaceQNew (const tarch::la::Vector< DIMENSIONS, double > &cellCentre, const tarch::la::Vector< DIMENSIONS, double > &cellSize, int axis)
 
int getFaceCardinality () const
 
int getCellQCardinality () const
 
int getCellQReconstructedCardinality () const
 
std::size_t getMemoryUsageInBytes () const
 

Static Public Member Functions

static DataRepositorygetInstance ()
 

Private Types

using CellQ = std::array<double, celldata::FVSolverQ::Cardinality>
 
using CellQReconstructed = std::array<double, celldata::FVSolverQReconstructed::Cardinality>
 
using FaceQNew = std::array<double, facedata::FVSolverQNew::Cardinality>
 

Private Member Functions

 DataRepository ()
 

Private Attributes

std::vector< DepthLevel_depthLevels
 

Detailed Description

A singleton repository to manage and provide access to grid cell and face data.

This class holds the memory for all cell-local and face-local data arrays (Q, QReconstructed, etc.) for the entire grid. It uses a keying system based on cell position and refinement depth to uniquely identify and retrieve data for any given cell.

Definition at line 27 of file DataRepository.h.

Member Typedef Documentation

◆ CellQ

using benchmarks::exahype2::kernelbenchmarks::DataRepository::CellQ = std::array<double, celldata::FVSolverQ::Cardinality>
private

Definition at line 104 of file DataRepository.h.

◆ CellQReconstructed

using benchmarks::exahype2::kernelbenchmarks::DataRepository::CellQReconstructed = std::array<double, celldata::FVSolverQReconstructed::Cardinality>
private

Definition at line 105 of file DataRepository.h.

◆ FaceQNew

using benchmarks::exahype2::kernelbenchmarks::DataRepository::FaceQNew = std::array<double, facedata::FVSolverQNew::Cardinality>
private

Definition at line 106 of file DataRepository.h.

Constructor & Destructor Documentation

◆ DataRepository() [1/3]

benchmarks::exahype2::kernelbenchmarks::DataRepository::DataRepository ( const DataRepository & )
delete

◆ DataRepository() [2/3]

benchmarks::exahype2::kernelbenchmarks::DataRepository::DataRepository ( DataRepository && )
delete

◆ ~DataRepository()

benchmarks::exahype2::kernelbenchmarks::DataRepository::~DataRepository ( )
default

◆ DataRepository() [3/3]

benchmarks::exahype2::kernelbenchmarks::DataRepository::DataRepository ( )
private

Definition at line 72 of file DataRepository.cpp.

References _depthLevels.

Member Function Documentation

◆ getCellQ()

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQ ( const tarch::la::Vector< DIMENSIONS, double > & cellCentre,
const tarch::la::Vector< DIMENSIONS, double > & cellSize )

◆ getCellQCardinality()

int benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQCardinality ( ) const

◆ getCellQReconstructed()

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQReconstructed ( const tarch::la::Vector< DIMENSIONS, double > & cellCentre,
const tarch::la::Vector< DIMENSIONS, double > & cellSize )

Definition at line 134 of file DataRepository.cpp.

References _depthLevels, and cellSize.

Referenced by benchmarks::exahype2::kernelbenchmarks::EnclaveDataRepository::buildFromBookmarks().

Here is the caller graph for this function:

◆ getCellQReconstructedCardinality()

int benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQReconstructedCardinality ( ) const

Definition at line 103 of file DataRepository.cpp.

Referenced by benchmarks::exahype2::kernelbenchmarks::EnclaveDataRepository::buildFromBookmarks().

Here is the caller graph for this function:

◆ getFaceCardinality()

int benchmarks::exahype2::kernelbenchmarks::DataRepository::getFaceCardinality ( ) const

◆ getFaceQNew() [1/2]

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getFaceQNew ( const tarch::la::Vector< DIMENSIONS, double > & cellCentre,
const tarch::la::Vector< DIMENSIONS, double > & cellSize,
int axis )

Definition at line 159 of file DataRepository.cpp.

References _depthLevels, cellSize, and benchmarks::exahype2::kernelbenchmarks::DataRepository::Indexing::getFaceIndex().

Here is the call graph for this function:

◆ getFaceQNew() [2/2]

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getFaceQNew ( int index,
int depth,
int axis )

◆ getInstance()

◆ getMemoryUsageInBytes()

std::size_t benchmarks::exahype2::kernelbenchmarks::DataRepository::getMemoryUsageInBytes ( ) const

Definition at line 105 of file DataRepository.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ operator=() [1/2]

DataRepository & benchmarks::exahype2::kernelbenchmarks::DataRepository::operator= ( const DataRepository & )
delete

◆ operator=() [2/2]

DataRepository & benchmarks::exahype2::kernelbenchmarks::DataRepository::operator= ( DataRepository && )
delete

Field Documentation

◆ _depthLevels

std::vector<DepthLevel> benchmarks::exahype2::kernelbenchmarks::DataRepository::_depthLevels
private

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