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

#include <AoSoA.hpp>

+ Inheritance diagram for llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >:
+ Collaboration diagram for llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >:

Public Types

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

Public Member Functions

constexpr AoSoA ()=default
 
constexpr AoSoA (TArrayExtents extents, TRecordDim={})
 
constexpr auto blobSize (size_type) const -> size_type
 
template<std::size_t... RecordCoords>
constexpr auto blobNrAndOffset (typename Base::ArrayIndex ai, RecordCoord< RecordCoords... > rc={}) const -> NrAndOffset< size_type >
 
template<std::size_t... RecordCoords>
constexpr auto blobNrAndOffset (size_type flatArrayIndex, 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 TArrayExtents::value_type lanes = Lanes
 
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, typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
struct llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >

Array of struct of arrays mapping. Used to create a View via allocView.

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

Definition at line 44 of file AoSoA.hpp.

Member Typedef Documentation

◆ LinearizeArrayIndexFunctor

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
using llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::LinearizeArrayIndexFunctor = TLinearizeArrayIndexFunctor

Definition at line 53 of file AoSoA.hpp.

◆ Permuter

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
using llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::Permuter = PermuteFields<FlatRecordDim<TRecordDim> >

Definition at line 54 of file AoSoA.hpp.

Constructor & Destructor Documentation

◆ AoSoA() [1/2]

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
constexpr llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::AoSoA ( )
constexprdefault

◆ AoSoA() [2/2]

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
constexpr llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::AoSoA ( TArrayExtents  extents,
TRecordDim  = {} 
)
inlineexplicitconstexpr

Definition at line 62 of file AoSoA.hpp.

Member Function Documentation

◆ blobNrAndOffset() [1/2]

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
template<std::size_t... RecordCoords>
constexpr auto llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::blobNrAndOffset ( size_type  flatArrayIndex,
RecordCoord< RecordCoords... >  = {} 
) const -> NrAndOffset<size_type>
inlineconstexpr

Definition at line 84 of file AoSoA.hpp.

◆ blobNrAndOffset() [2/2]

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
template<std::size_t... RecordCoords>
constexpr auto llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::blobNrAndOffset ( typename Base::ArrayIndex  ai,
RecordCoord< RecordCoords... >  rc = {} 
) const -> NrAndOffset<size_type>
inlineconstexpr

Definition at line 75 of file AoSoA.hpp.

◆ blobSize()

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
constexpr auto llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::blobSize ( size_type  ) const -> size_type
inlineconstexpr

Definition at line 67 of file AoSoA.hpp.

Member Data Documentation

◆ blobCount

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
constexpr std::size_t llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::blobCount = 1
inlinestaticconstexpr

Definition at line 55 of file AoSoA.hpp.

◆ fieldAlignment

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
constexpr FieldAlignment llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::fieldAlignment = TFieldAlignment
inlinestaticconstexpr

Definition at line 52 of file AoSoA.hpp.

◆ lanes

template<typename TArrayExtents , typename TRecordDim , typename TArrayExtents::value_type Lanes, FieldAlignment TFieldAlignment = FieldAlignment::Align, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder>
constexpr TArrayExtents::value_type llama::mapping::AoSoA< TArrayExtents, TRecordDim, Lanes, TFieldAlignment, TLinearizeArrayIndexFunctor, PermuteFields >::lanes = Lanes
inlinestaticconstexpr

Definition at line 51 of file AoSoA.hpp.


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