15 #ifndef LSIMPLEMATRIX_H 16 #define LSIMPLEMATRIX_H 18 #include "pandabase.h" 21 #include <Eigen/Dense> 31 template <
class FloatType,
int NumRows,
int NumCols>
37 INLINE
const FloatType &operator () (
int row,
int col)
const;
38 INLINE FloatType &operator () (
int row,
int col);
39 INLINE
const FloatType &operator () (
int col)
const;
40 INLINE FloatType &operator () (
int col);
43 FloatType _array[NumRows][NumCols];
46 #include "lsimpleMatrix.I" 50 #define UNALIGNED_LINMATH_MATRIX(FloatType, NumRows, NumCols) Eigen::Matrix<FloatType, NumRows, NumCols, Eigen::DontAlign | Eigen::RowMajor> 53 #define LINMATH_MATRIX(FloatType, NumRows, NumCols) Eigen::Matrix<FloatType, NumRows, NumCols, Eigen::RowMajor> 54 #else // LINMATH_ALIGN 55 #define LINMATH_MATRIX(FloatType, NumRows, NumCols) UNALIGNED_LINMATH_MATRIX(FloatType, NumRows, NumCols) 56 #endif // LINMATH_ALIGN 59 #define UNALIGNED_LINMATH_MATRIX(FloatType, NumRows, NumCols) LSimpleMatrix<FloatType, NumRows, NumCols> 60 #define LINMATH_MATRIX(FloatType, NumRows, NumCols) UNALIGNED_LINMATH_MATRIX(FloatType, NumRows, NumCols) 64 #if defined(LINMATH_ALIGN) && defined(HAVE_EIGEN) && defined(__AVX__) 65 #define ALIGN_LINMATH ALIGN_32BYTE 66 #elif defined(LINMATH_ALIGN) 67 #define ALIGN_LINMATH ALIGN_16BYTE 70 #endif // LINMATH_ALIGN This class provides an underlying storage of the various linear-algebra classes (e.g.