Low-Level Abstraction of Memory Access
llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap > Struct Template Reference

#include <Projection.hpp>

+ Inheritance diagram for llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >:
+ Collaboration diagram for llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >:

Public Types

using Inner = InnerMapping< TArrayExtents, internal::ReplaceTypesByProjectionResults< TRecordDim, TProjectionMap > >
 
using ProjectionMap = TProjectionMap
 
using ArrayExtents = typename Inner::ArrayExtents
 
using RecordDim = TRecordDim
 

Public Member Functions

template<std::size_t... RecordCoords, typename BlobArray >
constexpr auto compute (ArrayIndex ai, RecordCoord< RecordCoords... > rc, BlobArray &blobs) const
 
template<std::size_t... RecordCoords>
constexpr auto blobNrAndOffset (ArrayIndex ai, RecordCoord< RecordCoords... > rc={}) const -> NrAndOffset< typename ArrayExtents::value_type >
 

Static Public Member Functions

template<typename RecordCoord >
static constexpr auto isComputed (RecordCoord) -> bool
 

Protected Types

using ArrayIndex = typename ArrayExtents::Index
 

Detailed Description

template<typename TArrayExtents, typename TRecordDim, template< typename, typename > typename InnerMapping, typename TProjectionMap>
struct llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >

Mapping that projects types in the record domain to different types. Projections are executed during load and store.

Template Parameters
TProjectionMapA type list of binary type lists (a map) specifing a projection (map value) for a type or the type at a RecordCoord (map key). A projection is a type with two functions: struct Proj { static auto load(auto&& fromMem); static auto store(auto&& toMem); };

Definition at line 131 of file Projection.hpp.

Member Typedef Documentation

◆ ArrayExtents

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
using llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::ArrayExtents = typename Inner::ArrayExtents

Definition at line 137 of file Projection.hpp.

◆ ArrayIndex

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
using llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::ArrayIndex = typename ArrayExtents::Index
protected

Definition at line 145 of file Projection.hpp.

◆ Inner

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
using llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::Inner = InnerMapping<TArrayExtents, internal::ReplaceTypesByProjectionResults<TRecordDim, TProjectionMap> >

Definition at line 134 of file Projection.hpp.

◆ ProjectionMap

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
using llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::ProjectionMap = TProjectionMap

Definition at line 136 of file Projection.hpp.

◆ RecordDim

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
using llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::RecordDim = TRecordDim

Definition at line 138 of file Projection.hpp.

Member Function Documentation

◆ blobNrAndOffset()

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
template<std::size_t... RecordCoords>
constexpr auto llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::blobNrAndOffset ( ArrayIndex  ai,
RecordCoord< RecordCoords... >  rc = {} 
) const -> NrAndOffset<typename ArrayExtents::value_type>
inlineconstexpr

Definition at line 174 of file Projection.hpp.

◆ compute()

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
template<std::size_t... RecordCoords, typename BlobArray >
constexpr auto llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::compute ( ArrayIndex  ai,
RecordCoord< RecordCoords... >  rc,
BlobArray &  blobs 
) const
inlineconstexpr

Definition at line 156 of file Projection.hpp.

◆ isComputed()

template<typename TArrayExtents , typename TRecordDim , template< typename, typename > typename InnerMapping, typename TProjectionMap >
template<typename RecordCoord >
static constexpr auto llama::mapping::Projection< TArrayExtents, TRecordDim, InnerMapping, TProjectionMap >::isComputed ( RecordCoord  ) -> bool
inlinestaticconstexpr

Definition at line 149 of file Projection.hpp.


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