5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_LINALG_OBJECT_TRAITS_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_LINALG_OBJECT_TRAITS_HPP_
11#include "arene/base/mdspan/mdspan.hpp"
12#include "arene/base/stdlib_choice/is_assignable.hpp"
13#include "arene/base/stdlib_choice/is_default_constructible.hpp"
14#include "arene/base/stdlib_choice/remove_cv.hpp"
15#include "arene/base/type_traits/is_copyable.hpp"
33namespace linalg_traits_detail {
37extern constexpr bool is_in_vector_v{
false};
44template <
typename ElementType,
typename Extents,
typename LayoutPolicy,
typename AccessorPolicy>
45extern constexpr bool is_in_vector_v<mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>>{
46 mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::rank() == 1U &&
47 is_scalar_v<
typename mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::value_type>
53extern constexpr bool is_out_vector_v{
false};
60template <
typename ElementType,
typename Extents,
typename LayoutPolicy,
typename AccessorPolicy>
61extern constexpr bool is_out_vector_v<mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>>{
62 is_in_vector_v<mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>> &&
64 typename mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::reference,
65 typename mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::element_type>::value &&
66 mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::is_always_unique()
72extern constexpr bool is_in_matrix_v{
false};
79template <
typename ElementType,
typename Extents,
typename LayoutPolicy,
typename AccessorPolicy>
80extern constexpr bool is_in_matrix_v<mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>>{
81 mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::rank() == 2U &&
82 is_scalar_v<
typename mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::value_type>
88extern constexpr bool is_out_matrix_v{
false};
95template <
typename ElementType,
typename Extents,
typename LayoutPolicy,
typename AccessorPolicy>
96extern constexpr bool is_out_matrix_v<mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>>{
97 is_in_matrix_v<mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>> &&
99 typename mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::reference,
100 typename mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::element_type>::value &&
101 mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>::is_always_unique()
Definition math_traits.hpp:17
constexpr bool is_out_vector_v
Determine if the given type is an out-vector, usable as an output vector for linalg algorithms.
constexpr bool is_in_matrix_v
Determine if the given type is an in-matrix, usable as an input matrix for linalg algorithms.
constexpr bool is_inout_object_v
Determine if the given type is an inout-object, i.e. an inout-vector or inout-matrix.
constexpr bool is_in_object_v
Determine if the given type is an in-object, i.e. an in-vector or in-matrix.
constexpr bool is_inout_vector_v
Determine if the given type is an inout-vector, usable as both input and output vector for linalg alg...
constexpr bool is_inout_matrix_v
Determine if the given type is an inout-matrix, usable as both input and output matrix for linalg alg...
constexpr bool is_out_matrix_v
Determine if the given type is an out-matrix, usable as an output matrix for linalg algorithms.
constexpr bool is_in_vector_v
Determine if the given type is an in-vector, usable as an input vector for linalg algorithms.
constexpr bool is_scalar_v
Determine if the given type is a scalar for the purposes of linalg algorithms.
constexpr bool is_out_object_v
Determine if the given type is an out-object, i.e. an out-vector or out-matrix.
Definition array_exceptions_disabled.cpp:11
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10