Loading...
Searching...
No Matches
matrix_operation.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * MatrixOperation — what a product applies to each of its operands before
5 * multiplying: the matrix as it stands, or its conjugate transpose.
6 *
7 * The flag BLAS spells "N" and "C". Named here so a call reads as the algebra
8 * it performs -- multiply(ConjugateTranspose, left, None, right) is left^dagger
9 * right -- rather than as a letter whose meaning depends on the storage order
10 * the reader has in mind.
11 */
12
13namespace q3 {
14
16
17/// The letter BLAS takes for the operation.
18[[nodiscard]] inline const char* blas_transpose_flag(MatrixOperation operation) {
19 return operation == MatrixOperation::ConjugateTranspose ? "C" : "N";
20}
21
22} // namespace q3
const char * blas_transpose_flag(MatrixOperation operation)
The letter BLAS takes for the operation.