function multiply_matrix(T *, const T *, size_t, size_t) demo¶
template <typename T>
void multiply_matrix(T* out, const T* in, size_t rows, size_t cols)
Multiplies two matrices.
Performs a standard matrix multiplication on the given input and stores the result in the output buffer. All matrices are assumed to be stored in row-major order.
| T | The numeric type of the matrix elements. |
| out | Pointer to the output matrix buffer. |
| in | Pointer to the input matrix buffer. |
| rows | Number of rows in both matrices. |
| cols | Number of columns in both matrices. |
| out, in must point to valid buffers. | |
| rows and cols must be greater than zero. |
| On return, out contains the matrix product of in. |
| std::invalid_argument | if rows or cols are zero. |
| std::bad_alloc | if internal allocation fails. |
Since
1.2.0
Version
1.2.1
Defined at library.hpp:331