diff options
author | Stefan Klug <stefan.klug@ideasonboard.com> | 2025-04-03 17:49:08 +0200 |
---|---|---|
committer | Stefan Klug <stefan.klug@ideasonboard.com> | 2025-05-20 09:46:11 +0200 |
commit | aca9042abdf3d01f436dea147a82d37923c0eda6 (patch) | |
tree | 584ffa30c20b51b9a81d6a081af2682f31c67290 /src | |
parent | 5234e4936fab07a3540f8e6ae87d70579a51cfcc (diff) |
libcamera: matrix: Add a Span based constructor
When one wants to create a Matrix from existing data, currently the only
way is via std::array. Add a Span based constructor to allow creation
from vectors and alike.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/matrix.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp index e7e02722..49e2aa3b 100644 --- a/src/libcamera/matrix.cpp +++ b/src/libcamera/matrix.cpp @@ -42,6 +42,16 @@ LOG_DEFINE_CATEGORY(Matrix) */ /** + * \fn Matrix::Matrix(const Span<const T, Rows * Cols> data) + * \brief Construct a matrix from supplied data + * \param[in] data Data from which to construct a matrix + * + * \a data is a one-dimensional Span and will be turned into a matrix in + * row-major order. The size of \a data must be equal to the product of the + * number of rows and columns of the matrix (Rows x Cols). + */ + +/** * \fn Matrix::identity() * \brief Construct an identity matrix */ |