summaryrefslogtreecommitdiff
path: root/src/ipa/libipa/vector.cpp
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2024-06-14 21:02:11 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-17 12:19:01 +0300
commit01a33fedf6cdbb99c2b0316462a5578bb1b4b434 (patch)
tree628dc667ff92648f401966b0c2b01db0382d6736 /src/ipa/libipa/vector.cpp
parentcbfdfa42cacc0c9b83abb604e19febaf505cf24f (diff)
ipa: libipa: vector: Add matrix-vector multiplication
Add an operation for multiplying a matrix with a vector. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/libipa/vector.cpp')
-rw-r--r--src/ipa/libipa/vector.cpp11
1 files changed, 11 insertions, 0 deletions
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
@@ -124,6 +124,17 @@ namespace ipa {
*/
/**
+ * \fn Vector<T, Rows> operator*(const Matrix<T, Rows, Cols> &m, const Vector<T, Cols> &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<T, Rows> &lhs, const Vector<T, Rows> &rhs)
* \brief Compare vectors for equality
* \return True if the two vectors are equal, false otherwise