Low-Level Abstraction of Memory Access
llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences > Struct Template Reference

#include <FieldAccessCount.hpp>

+ Inheritance diagram for llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >:
+ Collaboration diagram for llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >:

Classes

struct  FieldHitsArray
 

Public Types

using RecordDim = typename Mapping::RecordDim
 
using CountType = TCountType
 

Public Member Functions

constexpr FieldAccessCount ()=default
 
 FieldAccessCount (Mapping mapping)
 
template<typename... Args>
 FieldAccessCount (Args &&... innerArgs)
 
constexpr auto blobSize (size_type blobIndex) const -> size_type
 
template<std::size_t... RecordCoords, typename Blobs >
auto compute (typename Mapping::ArrayExtents::Index ai, RecordCoord< RecordCoords... > rc, Blobs &blobs) const -> decltype(auto)
 
template<typename Blobs >
auto fieldHits (const Blobs &blobs) const -> const FieldHitsArray &
 
template<typename Blobs >
auto fieldHits (Blobs &blobs) const -> FieldHitsArray &
 
template<typename Blobs >
void printFieldHits (const Blobs &blobs) const
 
void printFieldHits (const FieldHitsArray &hits) const
 

Static Public Member Functions

template<std::size_t... RecordCoords>
static constexpr auto isComputed (RecordCoord< RecordCoords... >)
 

Static Public Attributes

static constexpr bool myCodeHandlesProxyReferences = MyCodeHandlesProxyReferences
 
static constexpr auto blobCount = Mapping::blobCount + 1
 

Detailed Description

template<typename Mapping, typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
struct llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >

Forwards all calls to the inner mapping. Counts all accesses made through this mapping and allows printing a summary.

Template Parameters
MappingThe type of the inner mapping.
TCountTypeThe type used for counting the number of accesses.
MyCodeHandlesProxyReferencesIf false, FieldAccessCount will avoid proxy references but can then only count the number of address computations

Definition at line 85 of file FieldAccessCount.hpp.

Member Typedef Documentation

◆ CountType

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
using llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::CountType = TCountType

Definition at line 92 of file FieldAccessCount.hpp.

◆ RecordDim

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
using llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::RecordDim = typename Mapping::RecordDim

Definition at line 91 of file FieldAccessCount.hpp.

Constructor & Destructor Documentation

◆ FieldAccessCount() [1/3]

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
constexpr llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::FieldAccessCount ( )
constexprdefault

◆ FieldAccessCount() [2/3]

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::FieldAccessCount ( Mapping  mapping)
inlineexplicit

Definition at line 150 of file FieldAccessCount.hpp.

◆ FieldAccessCount() [3/3]

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
template<typename... Args>
llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::FieldAccessCount ( Args &&...  innerArgs)
inlineexplicit

Definition at line 155 of file FieldAccessCount.hpp.

Member Function Documentation

◆ blobSize()

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
constexpr auto llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::blobSize ( size_type  blobIndex) const -> size_type
inlineconstexpr

Definition at line 161 of file FieldAccessCount.hpp.

◆ compute()

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
template<std::size_t... RecordCoords, typename Blobs >
auto llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::compute ( typename Mapping::ArrayExtents::Index  ai,
RecordCoord< RecordCoords... >  rc,
Blobs blobs 
) const -> decltype(auto)
inline

Definition at line 175 of file FieldAccessCount.hpp.

◆ fieldHits() [1/2]

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
template<typename Blobs >
auto llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::fieldHits ( Blobs blobs) const -> FieldHitsArray&
inline

Definition at line 210 of file FieldAccessCount.hpp.

◆ fieldHits() [2/2]

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
template<typename Blobs >
auto llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::fieldHits ( const Blobs blobs) const -> const FieldHitsArray&
inline

Definition at line 203 of file FieldAccessCount.hpp.

◆ isComputed()

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
template<std::size_t... RecordCoords>
static constexpr auto llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::isComputed ( RecordCoord< RecordCoords... >  )
inlinestaticconstexpr

Definition at line 169 of file FieldAccessCount.hpp.

◆ printFieldHits() [1/2]

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
template<typename Blobs >
void llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::printFieldHits ( const Blobs blobs) const
inline

Definition at line 216 of file FieldAccessCount.hpp.

◆ printFieldHits() [2/2]

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
void llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::printFieldHits ( const FieldHitsArray hits) const
inline

Definition at line 221 of file FieldAccessCount.hpp.

Member Data Documentation

◆ blobCount

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
constexpr auto llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::blobCount = Mapping::blobCount + 1
inlinestaticconstexpr

Definition at line 145 of file FieldAccessCount.hpp.

◆ myCodeHandlesProxyReferences

template<typename Mapping , typename TCountType = std::size_t, bool MyCodeHandlesProxyReferences = true>
constexpr bool llama::mapping::FieldAccessCount< Mapping, TCountType, MyCodeHandlesProxyReferences >::myCodeHandlesProxyReferences = MyCodeHandlesProxyReferences
inlinestaticconstexpr

Definition at line 93 of file FieldAccessCount.hpp.


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