Low-Level Abstraction of Memory Access
llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields > Struct Template Reference

#include <One.hpp>

+ Inheritance diagram for llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >:
+ Collaboration diagram for llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >:

Public Types

using Permuter = PermuteFields< FlatRecordDim< TRecordDim > >
 
- Public Types inherited from llama::mapping::MappingBase< TArrayExtents, TRecordDim >
using ArrayExtents = TArrayExtents
 
using RecordDim = TRecordDim
 

Public Member Functions

constexpr One ()=default
 
constexpr One (TArrayExtents extents, TRecordDim={})
 
constexpr auto blobSize (size_type) const -> size_type
 
template<std::size_t... RecordCoords>
constexpr auto blobNrAndOffset (typename Base::ArrayIndex, RecordCoord< RecordCoords... >={}) const -> NrAndOffset< size_type >
 
- Public Member Functions inherited from llama::mapping::MappingBase< TArrayExtents, TRecordDim >
constexpr MappingBase ()=default
 
constexpr MappingBase (ArrayExtents extents, RecordDim={})
 
constexpr auto extents () const -> ArrayExtents
 

Static Public Attributes

static constexpr FieldAlignment fieldAlignment = TFieldAlignment
 
static constexpr std::size_t blobCount = 1
 

Additional Inherited Members

- Protected Types inherited from llama::mapping::MappingBase< TArrayExtents, TRecordDim >
using ArrayIndex = typename ArrayExtents::Index
 
using size_type = typename ArrayExtents::value_type
 

Detailed Description

template<typename TArrayExtents, typename TRecordDim, FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
struct llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >

Maps all array dimension indices to the same location and layouts struct members consecutively. This mapping is used for temporary, single element views.

Template Parameters
TFieldAlignmentIf Align, padding bytes are inserted to guarantee that struct members are properly aligned. If false, struct members are tightly packed.
PermuteFieldsDefines how the record dimension's fields should be permuted. See PermuteFieldsInOrder, PermuteFieldsIncreasingAlignment, PermuteFieldsDecreasingAlignment and PermuteFieldsMinimizePadding.

Definition at line 24 of file One.hpp.

Member Typedef Documentation

◆ Permuter

template<typename TArrayExtents , typename TRecordDim , FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
using llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >::Permuter = PermuteFields<FlatRecordDim<TRecordDim> >

Definition at line 32 of file One.hpp.

Constructor & Destructor Documentation

◆ One() [1/2]

template<typename TArrayExtents , typename TRecordDim , FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
constexpr llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >::One ( )
constexprdefault

◆ One() [2/2]

template<typename TArrayExtents , typename TRecordDim , FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
constexpr llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >::One ( TArrayExtents  extents,
TRecordDim  = {} 
)
inlineexplicitconstexpr

Definition at line 40 of file One.hpp.

Member Function Documentation

◆ blobNrAndOffset()

template<typename TArrayExtents , typename TRecordDim , FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
template<std::size_t... RecordCoords>
constexpr auto llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >::blobNrAndOffset ( typename Base::ArrayIndex  ,
RecordCoord< RecordCoords... >  = {} 
) const -> NrAndOffset<size_type>
inlineconstexpr

Definition at line 54 of file One.hpp.

◆ blobSize()

template<typename TArrayExtents , typename TRecordDim , FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
constexpr auto llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >::blobSize ( size_type  ) const -> size_type
inlineconstexpr

Definition at line 45 of file One.hpp.

Member Data Documentation

◆ blobCount

template<typename TArrayExtents , typename TRecordDim , FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
constexpr std::size_t llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >::blobCount = 1
staticconstexpr

Definition at line 33 of file One.hpp.

◆ fieldAlignment

template<typename TArrayExtents , typename TRecordDim , FieldAlignment TFieldAlignment = FieldAlignment::Align, template< typename > typename PermuteFields = PermuteFieldsMinimizePadding>
constexpr FieldAlignment llama::mapping::One< TArrayExtents, TRecordDim, TFieldAlignment, PermuteFields >::fieldAlignment = TFieldAlignment
inlinestaticconstexpr

Definition at line 31 of file One.hpp.


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