5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_LINALG_MATH_TRAITS_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_LINALG_MATH_TRAITS_HPP_
13#include "arene/base/stdlib_choice/enable_if.hpp"
19namespace math_traits_impl {
23template <
typename T,
typename = arene::base::constra
ints<>>
24class default_math_traits {};
29class default_math_traits<T, arene::
base::constraints<std::enable_if_t<is_in_object_v<T>>>> {
32 using element_type =
typename T::element_type;
34 using value_type =
typename T::value_type;
36 using reference =
typename T::reference;
38 using index_type =
typename T::index_type;
40 using size_type =
typename T::size_type;
42 using layout_type =
typename T::layout_type;
44 using rank_type =
typename T::rank_type;
46 using extents_type =
typename T::extents_type;
48 using accessor_type =
typename T::accessor_type;
56class math_traits :
public math_traits_impl::default_math_traits<T> {};
A traits struct allowing SFINAE-friendly access to the properties of types which may be linalg object...
Definition math_traits.hpp:56
typename math_traits< T >::element_type math_element_t
The mdspan-equivalent element type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:61
typename math_traits< T >::extents_type math_extents_t
The mdspan-equivalent extents type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:96
typename math_traits< T >::value_type math_value_t
The mdspan-equivalent value type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:66
typename math_traits< T >::size_type math_size_t
The mdspan-equivalent size type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:81
typename math_traits< T >::layout_type math_layout_t
The mdspan-equivalent layout type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:86
typename math_traits< T >::reference math_reference_t
The mdspan-equivalent reference type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:71
typename math_traits< T >::accessor_type math_accessor_t
The mdspan-equivalent accessor type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:101
typename math_traits< T >::rank_type math_rank_t
The mdspan-equivalent rank type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:91
typename math_traits< T >::index_type math_index_t
The mdspan-equivalent index type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:76
Definition accumulate.hpp:37
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36