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 | 2a29a2a6a1784223a9caf1fae2a768fe550b5f64 (patch) | |
tree | fd5c3f81c211545755157af755dfaeeb36d483e1 /src/ipa/libipa/vector.cpp | |
parent | 69544f5b7bc1b28d288e239566d5e79289640892 (diff) |
ipa: libipa: vector: Add element-wise min() and max() functions
Add functions to calculate the element-wise minimum and maximum of two
vectors or of a vector and a scalar. This will be used in algorithm
implementations.
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 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp index c5a0ac74..d29c1642 100644 --- a/src/ipa/libipa/vector.cpp +++ b/src/ipa/libipa/vector.cpp @@ -177,6 +177,34 @@ namespace ipa { */ /** + * \fn Vector::min(const Vector &other) const + * \brief Calculate the minimum of this vector and \a other element-wise + * \param[in] other The other vector + * \return The element-wise minimum of this vector and \a other + */ + +/** + * \fn Vector::min(T scalar) const + * \brief Calculate the minimum of this vector and \a scalar element-wise + * \param[in] scalar The scalar + * \return The element-wise minimum of this vector and \a scalar + */ + +/** + * \fn Vector::max(const Vector &other) const + * \brief Calculate the maximum of this vector and \a other element-wise + * \param[in] other The other vector + * \return The element-wise maximum of this vector and \a other + */ + +/** + * \fn Vector::max(T scalar) const + * \brief Calculate the maximum of this vector and \a scalar element-wise + * \param[in] scalar The scalar + * \return The element-wise maximum of this vector and \a scalar + */ + +/** * \fn Vector::dot(const Vector<T, Rows> &other) const * \brief Compute the dot product * \param[in] other The other vector |