From 01a33fedf6cdbb99c2b0316462a5578bb1b4b434 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Fri, 14 Jun 2024 21:02:11 +0900 Subject: ipa: libipa: vector: Add matrix-vector multiplication Add an operation for multiplying a matrix with a vector. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/libipa/vector.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ipa/libipa/vector.cpp') diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp index b071b261..bd00b019 100644 --- a/src/ipa/libipa/vector.cpp +++ b/src/ipa/libipa/vector.cpp @@ -123,6 +123,17 @@ namespace ipa { * \return The length of the vector */ +/** + * \fn Vector operator*(const Matrix &m, const Vector &v) + * \brief Multiply a matrix by a vector + * \tparam T Numerical type of the contents of the matrix and vector + * \tparam Rows The number of rows in the matrix + * \tparam Cols The number of columns in the matrix (= rows in the vector) + * \param m The matrix + * \param v The vector + * \return Product of matrix \a m and vector \a v + */ + /** * \fn bool operator==(const Vector &lhs, const Vector &rhs) * \brief Compare vectors for equality -- cgit v1.2.1