mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-15 16:35:06 +03:00
ipa: libipa: vector: Add sum() function
Add a function to calculate the sum of a vector. It will be useful for algorithms. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
This commit is contained in:
parent
2a29a2a6a1
commit
5ad6b3b1bb
2 changed files with 19 additions and 0 deletions
|
@ -289,6 +289,18 @@ namespace ipa {
|
|||
* \return The length of the vector
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn Vector::sum() const
|
||||
* \brief Calculate the sum of all the vector elements
|
||||
* \tparam R The type of the sum
|
||||
*
|
||||
* The type R of the sum defaults to the type T of the elements, but can be set
|
||||
* explicitly to use a different type in case the type T would risk
|
||||
* overflowing.
|
||||
*
|
||||
* \return The sum of all the vector elements
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn Vector<T, Rows> operator*(const Matrix<T, Rows, Cols> &m, const Vector<T, Cols> &v)
|
||||
* \brief Multiply a matrix by a vector
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue