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

Detailed Description

Various typedefs/aliases of the most useful array and view types.

Typedefs

template<typename ValueType , int Rank, typename Layout = C_layout, typename ContainerPolicy = heap<>>
using nda::array = basic_array<ValueType, Rank, Layout, 'A', ContainerPolicy>
 Alias template of an nda::basic_array with an 'A' algebra.
 
template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::array_const_view = basic_array_view<ValueType const, Rank, Layout, 'A', default_accessor, borrowed<>>
 Same as nda::array_view except for const value types.
 
template<typename ValueType , int Rank, typename Layout = C_layout>
using nda::array_contiguous_const_view = basic_array_view<ValueType const, Rank, Layout, 'A', default_accessor, borrowed<>>
 Same as nda::array_const_view except for contiguous memory layouts.
 
template<typename ValueType , int Rank, typename Layout = C_layout>
using nda::array_contiguous_view = basic_array_view<ValueType, Rank, Layout, 'A', default_accessor, borrowed<>>
 Same as nda::array_view except for contiguous memory layouts.
 
template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::array_view = basic_array_view<ValueType, Rank, Layout, 'A', default_accessor, borrowed<>>
 Alias template of an nda::basic_array_view with an 'A' algebra, nda::default_accessor and nda::borrowed owning policy.
 
template<typename ValueType , int Rank, typename Layout = C_layout>
using nda::cuarray = basic_array<ValueType, Rank, Layout, 'A', heap<mem::Device>>
 Similar to nda::array except the memory is stored on the device.
 
template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::cuarray_const_view = basic_array_view<ValueType const, Rank, Layout, 'A', default_accessor, borrowed<mem::Device>>
 Similar to nda::array_const_view except the memory is stored on the device.
 
template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::cuarray_view = basic_array_view<ValueType, Rank, Layout, 'A', default_accessor, borrowed<mem::Device>>
 Similar to nda::array_view except the memory is stored on the device.
 
template<typename ValueType , typename Layout = C_layout, typename ContainerPolicy = heap<mem::Device>>
using nda::cumatrix = basic_array<ValueType, 2, Layout, 'M', ContainerPolicy>
 Similar to nda::matrix except the memory is stored on the device.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::cumatrix_const_view = basic_array_view<ValueType const, 2, Layout, 'M', default_accessor, borrowed<mem::Device>>
 Similar to nda::matrix_const_view except the memory is stored on the device.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::cumatrix_view = basic_array_view<ValueType, 2, Layout, 'M', default_accessor, borrowed<mem::Device>>
 Similar to nda::matrix_view except the memory is stored on the device.
 
template<typename ValueType >
using nda::cuvector = basic_array<ValueType, 1, C_layout, 'V', heap<mem::Device>>
 Similar to nda::vector except the memory is stored on the device.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::cuvector_const_view = basic_array_view<ValueType const, 1, Layout, 'V', default_accessor, borrowed<mem::Device>>
 Similar to nda::vector_const_view except the memory is stored on the device.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::cuvector_view = basic_array_view<ValueType, 1, Layout, 'V', default_accessor, borrowed<mem::Device>>
 Similar to nda::vector_view except the memory is stored on the device.
 
template<typename ValueType , typename Layout = C_layout, typename ContainerPolicy = heap<>>
using nda::matrix = basic_array<ValueType, 2, Layout, 'M', ContainerPolicy>
 Alias template of an nda::basic_array with rank 2 and an 'M' algebra.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::matrix_const_view = basic_array_view<ValueType const, 2, Layout, 'M', default_accessor, borrowed<>>
 Same as nda::matrix_view except for const value types.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::matrix_view = basic_array_view<ValueType, 2, Layout, 'M', default_accessor, borrowed<>>
 Alias template of an nda::basic_array_view with rank 2, an 'M' algebra, nda::default_accessor and nda::borrowed owning policy.
 
template<typename ValueType , int N0, int... Ns>
using nda::stack_array
 Alias template of an nda::basic_array with static extents, contiguous C layout, 'A' algebra and nda::stack container policy.
 
template<typename ValueType , int N, int M>
using nda::stack_matrix
 Alias template of an nda::basic_array with rank 2, static extents, contiguous C layout, 'M' algebra and nda::stack memory policy.
 
template<typename ValueType , int N>
using nda::stack_vector
 Alias template of an nda::basic_array with rank 1, static extents, contiguous C layout, 'V' algebra and nda::stack memory policy.
 
template<typename ValueType , typename ContainerPolicy = heap<>>
using nda::vector = basic_array<ValueType, 1, C_layout, 'V', ContainerPolicy>
 Alias template of an nda::basic_array with rank 1 and a 'V' algebra.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::vector_const_view = basic_array_view<ValueType const, 1, Layout, 'V', default_accessor, borrowed<>>
 Same as nda::vector_view except for const value types.
 
template<typename ValueType , typename Layout = C_stride_layout>
using nda::vector_view = basic_array_view<ValueType, 1, Layout, 'V', default_accessor, borrowed<>>
 Alias template of an nda::basic_array_view with rank 1, a 'V' algebra, nda::default_accessor and nda::borrowed owning policy.
 

Typedef Documentation

◆ array

template<typename ValueType , int Rank, typename Layout = C_layout, typename ContainerPolicy = heap<>>
using nda::array = basic_array<ValueType, Rank, Layout, 'A', ContainerPolicy>

#include <nda/declarations.hpp>

Alias template of an nda::basic_array with an 'A' algebra.

Template Parameters
ValueTypeValue type of the array.
RankRank of the array.
LayoutLayout policy of the array.
ContainerPolicyMemory policy of the array.

Definition at line 75 of file declarations.hpp.

◆ array_const_view

template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::array_const_view = basic_array_view<ValueType const, Rank, Layout, 'A', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Same as nda::array_view except for const value types.

Template Parameters
ValueTypeValue type of the view.
RankRank of the view.
LayoutLayout policy of the view.

Definition at line 96 of file declarations.hpp.

◆ array_contiguous_const_view

template<typename ValueType , int Rank, typename Layout = C_layout>
using nda::array_contiguous_const_view = basic_array_view<ValueType const, Rank, Layout, 'A', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Same as nda::array_const_view except for contiguous memory layouts.

Template Parameters
ValueTypeValue type of the view.
RankRank of the view.
LayoutLayout policy of the view.

Definition at line 118 of file declarations.hpp.

◆ array_contiguous_view

template<typename ValueType , int Rank, typename Layout = C_layout>
using nda::array_contiguous_view = basic_array_view<ValueType, Rank, Layout, 'A', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Same as nda::array_view except for contiguous memory layouts.

Template Parameters
ValueTypeValue type of the view.
RankRank of the view.
LayoutLayout policy of the view.

Definition at line 107 of file declarations.hpp.

◆ array_view

template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::array_view = basic_array_view<ValueType, Rank, Layout, 'A', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Alias template of an nda::basic_array_view with an 'A' algebra, nda::default_accessor and nda::borrowed owning policy.

Template Parameters
ValueTypeValue type of the view.
RankRank of the view.
LayoutLayout policy of the view.

Definition at line 86 of file declarations.hpp.

◆ cuarray

template<typename ValueType , int Rank, typename Layout = C_layout>
using nda::cuarray = basic_array<ValueType, Rank, Layout, 'A', heap<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::array except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the array.
RankRank of the array.
LayoutLayout policy of the array.

Definition at line 239 of file declarations.hpp.

◆ cuarray_const_view

template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::cuarray_const_view = basic_array_view<ValueType const, Rank, Layout, 'A', default_accessor, borrowed<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::array_const_view except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the view.
RankRank of the view.
LayoutLayout policy of the view.

Definition at line 259 of file declarations.hpp.

◆ cuarray_view

template<typename ValueType , int Rank, typename Layout = C_stride_layout>
using nda::cuarray_view = basic_array_view<ValueType, Rank, Layout, 'A', default_accessor, borrowed<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::array_view except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the view.
RankRank of the view.
LayoutLayout policy of the view.

Definition at line 249 of file declarations.hpp.

◆ cumatrix

template<typename ValueType , typename Layout = C_layout, typename ContainerPolicy = heap<mem::Device>>
using nda::cumatrix = basic_array<ValueType, 2, Layout, 'M', ContainerPolicy>

#include <nda/declarations.hpp>

Similar to nda::matrix except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the matrix.
LayoutLayout policy of the matrix.
ContainerPolicyMemory policy of the matrix.

Definition at line 269 of file declarations.hpp.

◆ cumatrix_const_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::cumatrix_const_view = basic_array_view<ValueType const, 2, Layout, 'M', default_accessor, borrowed<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::matrix_const_view except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 287 of file declarations.hpp.

◆ cumatrix_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::cumatrix_view = basic_array_view<ValueType, 2, Layout, 'M', default_accessor, borrowed<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::matrix_view except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 278 of file declarations.hpp.

◆ cuvector

template<typename ValueType >
using nda::cuvector = basic_array<ValueType, 1, C_layout, 'V', heap<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::vector except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the vector.

Definition at line 295 of file declarations.hpp.

◆ cuvector_const_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::cuvector_const_view = basic_array_view<ValueType const, 1, Layout, 'V', default_accessor, borrowed<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::vector_const_view except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 313 of file declarations.hpp.

◆ cuvector_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::cuvector_view = basic_array_view<ValueType, 1, Layout, 'V', default_accessor, borrowed<mem::Device>>

#include <nda/declarations.hpp>

Similar to nda::vector_view except the memory is stored on the device.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 304 of file declarations.hpp.

◆ matrix

template<typename ValueType , typename Layout = C_layout, typename ContainerPolicy = heap<>>
using nda::matrix = basic_array<ValueType, 2, Layout, 'M', ContainerPolicy>

#include <nda/declarations.hpp>

Alias template of an nda::basic_array with rank 2 and an 'M' algebra.

Template Parameters
ValueTypeValue type of the matrix.
LayoutLayout policy of the matrix.
ContainerPolicyMemory policy of the matrix.

Definition at line 128 of file declarations.hpp.

◆ matrix_const_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::matrix_const_view = basic_array_view<ValueType const, 2, Layout, 'M', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Same as nda::matrix_view except for const value types.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 147 of file declarations.hpp.

◆ matrix_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::matrix_view = basic_array_view<ValueType, 2, Layout, 'M', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Alias template of an nda::basic_array_view with rank 2, an 'M' algebra, nda::default_accessor and nda::borrowed owning policy.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 138 of file declarations.hpp.

◆ stack_array

template<typename ValueType , int N0, int... Ns>
using nda::stack_array

#include <nda/declarations.hpp>

Initial value:
nda::basic_array<ValueType, 1 + sizeof...(Ns),
nda::basic_layout<nda::static_extents(N0, Ns...), nda::C_stride_order<1 + sizeof...(Ns)>, nda::layout_prop_e::contiguous>, 'A',
nda::stack<N0 *(Ns *... * 1)>>
A generic multi-dimensional array.
constexpr uint64_t static_extents(int i0, Is... is)
Encode the given shape into a single integer using the nda::encode function.
constexpr uint64_t C_stride_order
C/Row-major stride order.
Definition idx_map.hpp:65
Generic layout policy with arbitrary order.
Definition policies.hpp:115
Memory policy using an nda::mem::handle_stack.
Definition policies.hpp:84

Alias template of an nda::basic_array with static extents, contiguous C layout, 'A' algebra and nda::stack container policy.

Template Parameters
ValueTypeValue type of the array.
N0Size of the first dimension.
NsSizes of the other dimensions.

Definition at line 201 of file declarations.hpp.

◆ stack_matrix

template<typename ValueType , int N, int M>
using nda::stack_matrix

#include <nda/declarations.hpp>

Initial value:
nda::basic_array<ValueType, 2, nda::basic_layout<nda::static_extents(N, M), nda::C_stride_order<2>, nda::layout_prop_e::contiguous>, 'M',

Alias template of an nda::basic_array with rank 2, static extents, contiguous C layout, 'M' algebra and nda::stack memory policy.

Template Parameters
ValueTypeValue type of the matrix.
NNumber of rows.
MNumber of columns.

Definition at line 215 of file declarations.hpp.

◆ stack_vector

template<typename ValueType , int N>
using nda::stack_vector

#include <nda/declarations.hpp>

Initial value:
nda::basic_array<ValueType, 1, nda::basic_layout<nda::static_extents(N), nda::C_stride_order<1>, nda::layout_prop_e::contiguous>, 'V',

Alias template of an nda::basic_array with rank 1, static extents, contiguous C layout, 'V' algebra and nda::stack memory policy.

Template Parameters
ValueTypeValue type of the vector.
NSize of the vector.

Definition at line 227 of file declarations.hpp.

◆ vector

template<typename ValueType , typename ContainerPolicy = heap<>>
using nda::vector = basic_array<ValueType, 1, C_layout, 'V', ContainerPolicy>

#include <nda/declarations.hpp>

Alias template of an nda::basic_array with rank 1 and a 'V' algebra.

Template Parameters
ValueTypeValue type of the vector.
ContainerPolicyMemory policy of the vector.

Definition at line 156 of file declarations.hpp.

◆ vector_const_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::vector_const_view = basic_array_view<ValueType const, 1, Layout, 'V', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Same as nda::vector_view except for const value types.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 175 of file declarations.hpp.

◆ vector_view

template<typename ValueType , typename Layout = C_stride_layout>
using nda::vector_view = basic_array_view<ValueType, 1, Layout, 'V', default_accessor, borrowed<>>

#include <nda/declarations.hpp>

Alias template of an nda::basic_array_view with rank 1, a 'V' algebra, nda::default_accessor and nda::borrowed owning policy.

Template Parameters
ValueTypeValue type of the view.
LayoutLayout policy of the view.

Definition at line 166 of file declarations.hpp.