27#ifndef G2O_CORE_MATRIX_OPERATIONS_H
28#define G2O_CORE_MATRIX_OPERATIONS_H
44 template<
typename MatrixType>
45 inline void axpy(
const MatrixType& A,
const Eigen::Map<
const Eigen::VectorX<g_type>>& x,
int xoff, Eigen::Map<Eigen::VectorX<g_type>>& y,
int yoff)
47 y.segment<MatrixType::RowsAtCompileTime>(yoff) += A * x.segment<MatrixType::ColsAtCompileTime>(xoff);
51 inline void axpy(
const Eigen::Matrix<g_type, Eigen::Dynamic, t>& A,
const Eigen::Map<
const Eigen::VectorX<g_type>>& x,
int xoff, Eigen::Map<Eigen::VectorX<g_type>>& y,
int yoff)
53 y.segment(yoff, A.rows()) += A * x.segment<Eigen::Matrix<g_type, Eigen::Dynamic, t>::ColsAtCompileTime>(xoff);
57 inline void axpy(
const Eigen::MatrixX<g_type>& A,
const Eigen::Map<
const Eigen::VectorX<g_type>>& x,
int xoff, Eigen::Map<Eigen::VectorX<g_type>>& y,
int yoff)
59 y.segment(yoff, A.rows()) += A * x.segment(xoff, A.cols());
62 template<
typename MatrixType>
63 inline void atxpy(
const MatrixType& A,
const Eigen::Map<
const Eigen::VectorX<g_type>>& x,
int xoff, Eigen::Map<Eigen::VectorX<g_type>>& y,
int yoff)
65 y.segment<MatrixType::ColsAtCompileTime>(yoff) += A.transpose() * x.segment<MatrixType::RowsAtCompileTime>(xoff);
69 inline void atxpy(
const Eigen::Matrix<g_type, Eigen::Dynamic, t>& A,
const Eigen::Map<
const Eigen::VectorX<g_type>>& x,
int xoff, Eigen::Map<Eigen::VectorX<g_type>>& y,
int yoff)
71 y.segment<Eigen::Matrix<g_type, Eigen::Dynamic, t>::ColsAtCompileTime>(yoff) += A.transpose() * x.segment(xoff, A.rows());
75 inline void atxpy(
const Eigen::MatrixX<g_type>& A,
const Eigen::Map<
const Eigen::VectorX<g_type>>& x,
int xoff, Eigen::Map<Eigen::VectorX<g_type>>& y,
int yoff)
77 y.segment(yoff, A.cols()) += A.transpose() * x.segment(xoff, A.rows());
void axpy(const MatrixType &A, const Eigen::Map< const Eigen::VectorX< g_type > > &x, int xoff, Eigen::Map< Eigen::VectorX< g_type > > &y, int yoff)
Computes y[yoff..] += A * x[xoff..] for fixed-size blocks.
The primary namespace for the NDEVR SDK.