chsvlib
chsv helper source code

◆ transpose_copy()

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

Transposes a matrix assigning the result to a non-overlapping array of existing elements.

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 with an array of n2 elements of the type ValueType. On output, the elements of the transposition are assigned to the respective elements of result. The buffer may not overlap column_matrix.
Exceptions
Anyexception generated from an invocation of copy-assignment of ValueType.

To transpose a matrix writing the result to an uninitialized memory buffer, constructing elements in it, rather than assigning those, use transpose_construct.

To transpose a matrix in place, use transpose_inplace.