11#ifndef TLAPACK_ARRAY_CONCEPTS_HH
12#define TLAPACK_ARRAY_CONCEPTS_HH
14#if __cplusplus >= 202002L
18 #include <type_traits>
54 concept Arithmetic =
requires(
const T& a,
const T& b, T& c)
104 template <
typename T>
106 std::numeric_limits<T>::is_specialized&&
requires(
const T& a, T& b)
120 ->std::same_as<
bool>;
124 ->std::same_as<
bool>;
163 template <
typename T>
211 template <
typename T>
216 a = std::forward<T>(a);
251 template <
typename vector_t>
285 template <
typename vector_t>
329 template <
typename matrix_t>
416 template <
typename matrix_t>
421 slice(
A, pair{0, 1}, pair{0, 1})
451 slice(
A, 0, pair{0, 1})
457 slice(
A, pair{0, 1}, 0)
488 template <
typename matrix_t>
501 template <
typename pair_t>
505 template <
typename pair_t>
537 template <
typename work_t>
544 ->internal::PairOfTransposableMatrixAndOther<>;
550 ->internal::PairOfVectorAndOther<>;
562 template <
typename T>
572 template <
typename T>
573 concept Side = std::convertible_to<T, tlapack::Side>;
583 template <
typename T>
584 concept Direction = std::convertible_to<T, tlapack::Direction>;
593 template <
typename T>
594 concept Op = std::convertible_to<T, tlapack::Op>;
604 template <
typename T>
605 concept StoreV = std::convertible_to<T, tlapack::StoreV>;
614 template <
typename T>
615 concept Norm = std::convertible_to<T, tlapack::Norm>;
624 template <
typename T>
625 concept Uplo = std::convertible_to<T, tlapack::Uplo>;
634 template <
typename T>
635 concept Diag = std::convertible_to<T, tlapack::Diag>;
651 template <
typename T>
667 (legacy_matrix(
A)).ptr[0]
671 (legacy_matrix(
A)).ldim
689 template <
typename matrix_t>
709 template <
typename vector_t>
721 (legacy_vector(
v)).ptr[0]
725 (legacy_vector(
v)).inc
766 template <
typename array_t>
813 template <
typename matrix_t>
837 template <
typename matrix_t>
864 template <
typename vector_t>
888 template <
typename vector_t>
896 #define TLAPACK_MATRIX tlapack::concepts::Matrix
899 #define TLAPACK_SMATRIX tlapack::concepts::SliceableMatrix
903 #define TLAPACK_STMATRIX tlapack::concepts::SliceableTransposeMatrix
906 #define TLAPACK_VECTOR tlapack::concepts::Vector
909 #define TLAPACK_SVECTOR tlapack::concepts::SliceableVector
912 #define TLAPACK_WORKSPACE tlapack::concepts::Workspace
915 #define TLAPACK_SCALAR tlapack::concepts::Scalar
918 #define TLAPACK_REAL tlapack::concepts::Real
921 #define TLAPACK_COMPLEX tlapack::concepts::Complex
924 #define TLAPACK_INDEX tlapack::concepts::Index
927 #define TLAPACK_SIDE tlapack::concepts::Side
930 #define TLAPACK_DIRECTION tlapack::concepts::Direction
933 #define TLAPACK_OP tlapack::concepts::Op
936 #define TLAPACK_STOREV tlapack::concepts::StoreV
939 #define TLAPACK_NORM tlapack::concepts::Norm
942 #define TLAPACK_UPLO tlapack::concepts::Uplo
945 #define TLAPACK_DIAG tlapack::concepts::Diag
948 #define TLAPACK_LEGACY_ARRAY tlapack::concepts::LegacyArray
951 #define TLAPACK_LEGACY_MATRIX tlapack::concepts::LegacyMatrix
954 #define TLAPACK_LEGACY_VECTOR tlapack::concepts::LegacyVector
957 #define TLAPACK_CMATRIX tlapack::concepts::ConstructableMatrix
961 #define TLAPACK_CSMATRIX tlapack::concepts::ConstructableAndSliceableMatrix
964 #define TLAPACK_CVECTOR tlapack::concepts::ConstructableVector
968 #define TLAPACK_CSVECTOR tlapack::concepts::ConstructableAndSliceableVector
972 #define TLAPACK_MATRIX class
973 #define TLAPACK_SMATRIX class
974 #define TLAPACK_STMATRIX class
976 #define TLAPACK_VECTOR class
977 #define TLAPACK_SVECTOR class
979 #define TLAPACK_WORKSPACE class
981 #define TLAPACK_SCALAR class
982 #define TLAPACK_REAL class
983 #define TLAPACK_COMPLEX class
984 #define TLAPACK_INDEX class
986 #define TLAPACK_SIDE class
987 #define TLAPACK_DIRECTION class
988 #define TLAPACK_OP class
989 #define TLAPACK_STOREV class
990 #define TLAPACK_NORM class
991 #define TLAPACK_UPLO class
992 #define TLAPACK_DIAG class
994 #define TLAPACK_LEGACY_ARRAY class
995 #define TLAPACK_LEGACY_MATRIX class
996 #define TLAPACK_LEGACY_VECTOR class
998 #define TLAPACK_CMATRIX class
999 #define TLAPACK_CSMATRIX class
1000 #define TLAPACK_CVECTOR class
1001 #define TLAPACK_CSVECTOR class
Definition concepts.hpp:54
Definition concepts.hpp:164
Definition concepts.hpp:838
Definition concepts.hpp:889
Definition concepts.hpp:767
Definition concepts.hpp:814
Definition concepts.hpp:865
Definition concepts.hpp:635
Definition concepts.hpp:584
Definition concepts.hpp:563
Definition concepts.hpp:652
Definition concepts.hpp:690
Definition concepts.hpp:710
Definition concepts.hpp:330
Definition concepts.hpp:615
Definition concepts.hpp:594
Definition concepts.hpp:105
Definition concepts.hpp:212
Definition concepts.hpp:573
Definition concepts.hpp:417
Definition concepts.hpp:286
Definition concepts.hpp:605
Definition concepts.hpp:489
Definition concepts.hpp:625
Definition concepts.hpp:252
Definition concepts.hpp:538
Definition concepts.hpp:502
Definition concepts.hpp:506
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113
constexpr bool isnan(const T &x) noexcept
Extends std::isnan() to complex numbers.
Definition utils.hpp:125
constexpr real_type< T > real(const T &x) noexcept
Extends std::real() to real datatypes.
Definition utils.hpp:71
constexpr T conj(const T &x) noexcept
Extends std::conj() to real datatypes.
Definition utils.hpp:100
constexpr auto diag(T &A, int diagIdx=0) noexcept
Get the Diagonal of an Eigen Matrix.
Definition eigen.hpp:576
constexpr real_type< T > imag(const T &x) noexcept
Extends std::imag() to real datatypes.
Definition utils.hpp:86
constexpr bool isinf(const T &x) noexcept
Extends std::isinf() to complex numbers.
Definition utils.hpp:117
constexpr Layout layout
Layout of a matrix or vector.
Definition arrayTraits.hpp:232
Layout
Definition types.hpp:29
@ ColMajor
Column-major layout.
@ RowMajor
Row-major layout.