chsvlib
chsv helper source code

◆ mul_matrix_copy()

void Chusov::Math::mul_matrix_copy ( const ValueType *  left_column_matrix,
const ValueType *  right_column_matrix,
std::size_t  left_rows,
std::size_t  left_columns_right_rows,
std::size_t  right_columns,
ValueType *restrict  result 
)

Calculates a product of two matrices specified as two-dimensional arrays of scalars and assigns the result to a third matrix.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in]left_column_matrixA pointer which addresses the left operand which is a column-major matrix of left_columns_right_rows by left_rows elements.
[in]right_column_matrixA pointer to the second column-major matrix of right_columns by left_columns_right_rows elements.
left_rowsA number of rows in the left multiplicand.
left_columns_right_rowsA number of columns in the left multiplicand and a number of rows in the right multiplicand.
right_columnsA number of columns in the right multiplicand matrix.
[in,out]resultA pointer to a matrix which accepts the result of the operation. The elements of the product matrix are assigned to the respective elements of result in a column-major order. The buffer must not overlap with either left_column_matrix or right_column_matrix.
Exceptions
Anyexceptions thrown from addition, multiplication or assignment of ValueType elements.

The elements of the resulting matrix are sequentially assigned in the column-major order to the elements of the two-dimensional array pointed to by result. In order to construct elements of the result in an uninitialized buffer, use mul_matrix_construct. In order to perform multiplication in place of one of the multiplicands, use mul_matrix_inplace or mul_matrix_inplace_rev.