TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
Layout policies

Detailed Description

Various layout policies that can be used with nda::basic_array and nda::basic_array_view.

Classes

struct  nda::basic_layout< StaticExtents, StrideOrder, LayoutProp >
 Generic layout policy with arbitrary order. More...
 
struct  nda::basic_layout_str< StaticExtents, StrideOrder, LayoutProp >
 Generic layout policy with arbitrary order and possible string indices. More...
 
struct  nda::C_layout
 Contiguous layout policy with C-order (row-major order). More...
 
struct  nda::C_layout_str
 Contiguous layout policy with C-order (row-major order) and possible string indices. More...
 
struct  nda::C_stride_layout
 Strided (non-contiguous) layout policy with C-order (row-major order). More...
 
struct  nda::C_stride_layout_str
 Strided (non-contiguous) layout policy with C-order (row-major order) and possible string indices. More...
 
struct  nda::F_layout
 Contiguous layout policy with Fortran-order (column-major order). More...
 
struct  nda::F_layout_str
 Contiguous layout policy with Fortran-order (column-major order) and possible string indices. More...
 
struct  nda::F_stride_layout
 Strided (non-contiguous) layout policy with Fortran-order (column-major order). More...
 
struct  nda::F_stride_layout_str
 Strided (non-contiguous) layout policy with Fortran-order (column-major order) and possible string indices. More...
 

Typedefs

template<uint64_t StrideOrder>
using nda::contiguous_layout_with_stride_order = basic_layout<0, StrideOrder, layout_prop_e::contiguous>
 Contiguous layout policy with arbitrary stride order.
 
template<int Rank, uint64_t StrideOrder>
using nda::get_contiguous_layout_policy
 Get the contiguous layout policy for a given rank and stride order.
 

Typedef Documentation

◆ contiguous_layout_with_stride_order

template<uint64_t StrideOrder>
using nda::contiguous_layout_with_stride_order = basic_layout<0, StrideOrder, layout_prop_e::contiguous>

#include <nda/layout/policies.hpp>

Contiguous layout policy with arbitrary stride order.

Template Parameters
StrideOrderOrder in which the dimensions are stored in memory.

Definition at line 132 of file policies.hpp.

◆ get_contiguous_layout_policy

template<int Rank, uint64_t StrideOrder>
using nda::get_contiguous_layout_policy

#include <nda/layout/policies.hpp>

Initial value:
std::conditional_t<StrideOrder == C_stride_order<Rank>, C_layout,
std::conditional_t<StrideOrder == Fortran_stride_order<Rank>, F_layout, contiguous_layout_with_stride_order<StrideOrder>>>

Get the contiguous layout policy for a given rank and stride order.

Template Parameters
RankRank of the layout.
StrideOrderOrder in which the dimensions are stored in memory.

Definition at line 141 of file policies.hpp.