diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-16 21:02:52 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-26 19:05:19 +0200 |
commit | 69544f5b7bc1b28d288e239566d5e79289640892 (patch) | |
tree | 3a7c565deac057ad93603a9e43aaf416c0c5a4aa /src/ipa/libipa/vector.cpp | |
parent | f0d73c8758cf5def353489dfcab0cb4a157be667 (diff) |
ipa: libipa: vector: Add compound assignment operators
Extend the Vector class with compound assignment operators that match
the binary arithmetic operators.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Diffstat (limited to 'src/ipa/libipa/vector.cpp')
-rw-r--r-- | src/ipa/libipa/vector.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp index f86603e2..c5a0ac74 100644 --- a/src/ipa/libipa/vector.cpp +++ b/src/ipa/libipa/vector.cpp @@ -121,6 +121,62 @@ namespace ipa { */ /** + * \fn Vector::operator+=(Vector const &other) + * \brief Add \a other element-wise to this vector + * \param[in] other The other vector + * \return This vector + */ + +/** + * \fn Vector::operator+=(T scalar) + * \brief Add \a scalar element-wise to this vector + * \param[in] scalar The scalar + * \return This vector + */ + +/** + * \fn Vector::operator-=(Vector const &other) + * \brief Subtract \a other element-wise from this vector + * \param[in] other The other vector + * \return This vector + */ + +/** + * \fn Vector::operator-=(T scalar) + * \brief Subtract \a scalar element-wise from this vector + * \param[in] scalar The scalar + * \return This vector + */ + +/** + * \fn Vector::operator*=(const Vector &other) + * \brief Multiply this vector by \a other element-wise + * \param[in] other The other vector + * \return This vector + */ + +/** + * \fn Vector::operator*=(T scalar) + * \brief Multiply this vector by \a scalar element-wise + * \param[in] scalar The scalar + * \return This vector + */ + +/** + * \fn Vector::operator/=(const Vector &other) + * \brief Divide this vector by \a other element-wise + * \param[in] other The other vector + * \return This vector + */ + +/** + * \fn Vector::operator/=(T scalar) + * \brief Divide this vector by \a scalar element-wise + * \param[in] scalar The scalar + * \return This vector + */ + +/** * \fn Vector::dot(const Vector<T, Rows> &other) const * \brief Compute the dot product * \param[in] other The other vector |