chsvlib
chsv helper source code

◆ transpose_construct()

void Chusov::Math::transpose_construct ( const ValueType *restrict  column_matrix,
std::size_t  columns,
std::size_t  rows,
ValueType *restrict  result 
)
noexcept

Transposes a matrix constructing the result in a provided uninitialized buffer.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in]column_matrixA pointer to a matrix, of columns by rows elements, to transpose.
columnsA number of columns in the matrix to transpose.
rowsA number of rows in the matrix to transpose.
[in,out]resultA pointer to an output buffer capable of holding n2 elements of the type ValueType. The elements of the transposition are constructed in respective positions in the result buffer.
Exceptions
Anyexception generated from an invocation of copy-construction of ValueType.

The function discards any existing content in result, i.e. no destruction of any existing data takes place. In order to perform assignment of the output values, rather than constructing new elements in result, use transpose_copy.

To transpose a matrix in place, use transpose_inplace.