Performs a multiplication of two matrices represented by two-dimensional column-major arrays and writes the result in place of the left multiplicand.
- Template Parameters
-
ValueType | A type of a matrix element. |
- Parameters
-
[in,out] | left_column_matrix | A pointer to a buffer, that on input contains elements of the left multiplicand which is a column-major matrix of left_columns_right_rows by left_rows elements. On output the buffer contains the product of size left_rows * right_columns . Therefore, the function assumes that left_columns_right_rows <= right_columns . |
[in] | right_column_matrix | A pointer to a buffer holding the right column-major matrix multiplicand of right_columns by left_columns_right_rows elements. |
| left_rows | A number of rows in the left multiplicand. |
| left_columns_right_rows | A number of columns in the left multiplicand and a number of rows in the right multiplicand. The function assumes that left_columns_right_rows <= right_columns . |
| right_columns | A number of columns in the right matrix multiplicand. |
- Exceptions
-
std::bad_alloc | The function was unable to allocate memory necessary to perform the in-place multiplication. |
Any | exceptions that originate from addition, multiplication or assignment of ValueType scalars. |
To multiply matrices writing the difference in place of the second operand rather than the first one, use mul_matrix_inplace_rev. To write the product to a buffer different from buffers of both of the operands, use either mul_matrix_copy, to replace some other existing matrix with the product, or mul_matrix_construct to construct the result of multiplication in an uninitialized buffer.