Low-Level Abstraction of Memory Access
llama::mapping::LinearizeArrayIndexLeft Struct Reference

#include <Common.hpp>

Public Member Functions

template<typename ArrayExtents >
constexpr auto size (const ArrayExtents &extents) -> typename ArrayExtents::value_type
 
template<typename ArrayExtents >
constexpr auto operator() (const typename ArrayExtents::Index &ai, const ArrayExtents &extents) const -> typename ArrayExtents::value_type
 

Detailed Description

Functor that maps a ArrayIndex into linear numbers the way Fortran arrays work. The fast moving index of the ArrayIndex object should be the last one. E.g. ArrayIndex<3> a; stores 3 indices where a[0] should be incremented in the innermost loop.

Definition at line 83 of file Common.hpp.

Member Function Documentation

◆ operator()()

template<typename ArrayExtents >
constexpr auto llama::mapping::LinearizeArrayIndexLeft::operator() ( const typename ArrayExtents::Index ai,
const ArrayExtents extents 
) const -> typename ArrayExtents::value_type
inlineconstexpr
Parameters
aiIndex in the array dimensions.
extentsTotal size of the array dimensions.
Returns
Linearized index.

Definition at line 95 of file Common.hpp.

◆ size()

template<typename ArrayExtents >
constexpr auto llama::mapping::LinearizeArrayIndexLeft::size ( const ArrayExtents extents) -> typename ArrayExtents::value_type
inlineconstexpr

Definition at line 86 of file Common.hpp.


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