38 if (std::to_underlying(transform) > transform_mask)
40 PANIC(
"invalid MatrixTransform", std::to_underlying(transform));
48 return (std::to_underlying(transform) & detail::transpose_bit) != 0U;
54 return (std::to_underlying(transform) & detail::conjugate_bit) != 0U;
60 return static_cast<MatrixTransform>((std::to_underlying(outer) ^ std::to_underlying(inner)) & detail::transform_mask);
72 detail::require_valid_transform(transform);
73 if constexpr (uni20::is_complex_v<Scalar>)
79 return static_cast<MatrixTransform>(std::to_underlying(transform) & detail::transpose_bit);
86 switch (canonical_transform_for_scalar<Scalar>(transform))
95 PANIC(
"invalid canonical MatrixTransform", std::to_underlying(transform));
101 switch (canonical_transform_for_scalar<Scalar>(transform))
112 PANIC(
"invalid canonical MatrixTransform", std::to_underlying(transform));
constexpr blas_int transformed_cols(blas_int rows, blas_int cols, MatrixTransform transform)
Columns produced by applying transform to an untransformed matrix.
Definition blas_matrix.hpp:145
MatrixTransform
Logical matrix transform independent of a provider-specific opcode, although it happens to coincide w...
Definition blas_matrix.hpp:23
constexpr char blas_trans_char(MatrixTransform transform)
Lower a transform to the BLAS transpose character spelling used by selected providers.
Definition blas_matrix.hpp:99
constexpr blas_int transformed_rows(blas_int rows, blas_int cols, MatrixTransform transform)
Rows produced by applying transform to an untransformed matrix.
Definition blas_matrix.hpp:139
constexpr bool conjugates_values(MatrixTransform transform)
Return whether a matrix transform applies element-wise conjugation.
Definition blas_matrix.hpp:52
constexpr bool blas_trans_char_is_supported(MatrixTransform transform)
Return whether the current baseline provider path accepts a transform directly.
Definition blas_matrix.hpp:84
constexpr MatrixTransform canonical_transform_for_scalar(MatrixTransform transform)
Collapse conjugation-only distinctions for real scalar types.
Definition blas_matrix.hpp:70
constexpr MatrixTransform transpose_result_transform(MatrixTransform transform)
Transform induced on each GEMM operand by transposing the result.
Definition blas_matrix.hpp:64
constexpr bool swaps_axes(MatrixTransform transform)
Return whether a matrix transform swaps the logical axes.
Definition blas_matrix.hpp:46
constexpr MatrixTransform compose(MatrixTransform outer, MatrixTransform inner)
Compose two matrix transforms as outer(inner(A)).
Definition blas_matrix.hpp:58
Readable matrix shape plus transform as seen by a BLAS provider.
Definition blas_matrix.hpp:130
blas_int cols
Definition blas_matrix.hpp:133
MatrixTransform transform
Definition blas_matrix.hpp:135
blas_int leading_dimension
Definition blas_matrix.hpp:134
blas_int rows
Definition blas_matrix.hpp:132
Handle data
Definition blas_matrix.hpp:131
Writable matrix shape as seen by a BLAS/LAPACK provider.
Definition blas_matrix.hpp:119
blas_int rows
Definition blas_matrix.hpp:121
blas_int leading_dimension
Definition blas_matrix.hpp:123
Handle data
Definition blas_matrix.hpp:120
blas_int cols
Definition blas_matrix.hpp:122
#define PANIC(...)
Definition trace.hpp:382