TRIQS/nda 1.3.0
Multi-dimensional array library for C++
|
#include "./accessors.hpp"
#include "./concepts.hpp"
#include "./layout/idx_map.hpp"
#include "./layout/permutation.hpp"
#include "./layout/policies.hpp"
#include "./mem/address_space.hpp"
#include "./mem/policies.hpp"
#include "./traits.hpp"
#include <array>
#include <cstddef>
#include <cstdint>
#include <stdexcept>
#include <type_traits>
Provides various convenient aliases and helper functions for nda::basic_array and nda::basic_array_view.
Definition in file declarations.hpp.
Go to the source code of this file.
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 T , typename RT = get_regular_t<T>> | |
using | nda::get_regular_device_t |
Get the type of the nda::basic_array that would be obtained by constructing an array on device memory from a given type. | |
template<typename T , typename RT = get_regular_t<T>> | |
using | nda::get_regular_host_t |
Get the type of the nda::basic_array that would be obtained by constructing an array on host memory from a given type. | |
template<typename T , typename T2 = std::remove_reference_t<T>> | |
using | nda::get_regular_t = decltype(basic_array{std::declval<T>()}) |
Get the type of the nda::basic_array that would be obtained by constructing an array from a given type. | |
template<typename T , typename RT = get_regular_t<T>> | |
using | nda::get_regular_unified_t |
Get the type of the nda::basic_array that would be obtained by constructing an array on unified memory from a given type. | |
template<typename T , typename T2 = std::remove_reference_t<T>> | |
using | nda::get_view_t = std::remove_reference_t<decltype(basic_array_view{std::declval<T>()})> |
Get the type of the nda::basic_array_view that would be obtained by constructing a view from a given type. | |
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. | |
Functions | |
template<typename... Is> | |
constexpr uint64_t | nda::static_extents (int i0, Is... is) |
Encode the given shape into a single integer using the nda::encode function. | |
Variables | |
template<typename ValueType , int Rank, typename Layout , char Algebra, typename ContainerPolicy > | |
constexpr char | nda::get_algebra< basic_array< ValueType, Rank, Layout, Algebra, ContainerPolicy > > = Algebra |
Specialization of nda::get_algebra for nda::basic_array types. | |
template<typename ValueType , int Rank, typename Layout , char Algebra, typename AccessorPolicy , typename OwningPolicy > | |
constexpr char | nda::get_algebra< basic_array_view< ValueType, Rank, Layout, Algebra, AccessorPolicy, OwningPolicy > > = Algebra |
Specialization of nda::get_algebra for nda::basic_array_view types. | |
template<char OP, typename L , typename R > | |
constexpr char | nda::get_algebra< expr< OP, L, R > > = expr<OP, L, R>::algebra |
Specialization of nda::get_algebra for nda::expr types. | |
template<char OP, Array A> | |
constexpr char | nda::get_algebra< expr_unary< OP, A > > = get_algebra<A> |
Specialization of nda::get_algebra for nda::expr_unary types. | |
template<typename ValueType , int Rank, typename Layout , char Algebra, typename ContainerPolicy > | |
constexpr layout_info_t | nda::get_layout_info< basic_array< ValueType, Rank, Layout, Algebra, ContainerPolicy > > |
Specialization of nda::get_layout_info for nda::basic_array types. | |
template<typename ValueType , int Rank, typename Layout , char Algebra, typename AccessorPolicy , typename OwningPolicy > | |
constexpr layout_info_t | nda::get_layout_info< basic_array_view< ValueType, Rank, Layout, Algebra, AccessorPolicy, OwningPolicy > > |
Specialization of nda::get_layout_info for nda::basic_array_view types. | |
template<char OP, typename L , typename R > | |
constexpr layout_info_t | nda::get_layout_info< expr< OP, L, R > > = expr<OP, L, R>::compute_layout_info() |
Specialization of nda::get_layout_info for nda::expr types. | |
template<char OP, Array A> | |
constexpr layout_info_t | nda::get_layout_info< expr_unary< OP, A > > = get_layout_info<A> |
Specialization of nda::get_layout_info for nda::expr_unary types. | |
template<typename ValueType , int Rank, typename Layout , char Algebra, typename ContainerPolicy > | |
constexpr bool | nda::is_regular_v< basic_array< ValueType, Rank, Layout, Algebra, ContainerPolicy > > = true |
Specialization of nda::is_regular_v for nda::basic_array. | |
template<typename ValueType , int Rank, typename Layout , char Algebra, typename AccessorPolicy , typename OwningPolicy > | |
constexpr bool | nda::is_view_v< basic_array_view< ValueType, Rank, Layout, Algebra, AccessorPolicy, OwningPolicy > > = true |
Specialization of nda::is_view_v for nda::basic_array_view. | |