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>
This commit is contained in:
Laurent Pinchart 2024-11-16 21:02:52 +02:00
parent 69544f5b7b
commit 2a29a2a6a1
2 changed files with 48 additions and 0 deletions

View file

@ -176,6 +176,34 @@ namespace ipa {
* \return This vector
*/
/**
* \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