mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-14 18:33:16 +08:00
big reorganisation of asserts, so that:
0) asserts are only done in the public API, except for a few ones explicitly named eigen_internal_assert. 1) internal asserts are disabled unless EIGEN_INTERNAL_DEBUGGING is defined. This limits the impact of debugging on performance. 2) no 'unused argument' warnings anymore when compiling with -DNDEBUG
This commit is contained in:
parent
b569216dc3
commit
68eba600b1
@ -40,7 +40,7 @@ template<typename MatrixType> class Column
|
|||||||
Column(const MatRef& matrix, int col)
|
Column(const MatRef& matrix, int col)
|
||||||
: m_matrix(matrix), m_col(col)
|
: m_matrix(matrix), m_col(col)
|
||||||
{
|
{
|
||||||
EIGEN_CHECK_COL_RANGE(matrix, col);
|
assert(col >= 0 && col < matrix.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
Column(const Column& other)
|
Column(const Column& other)
|
||||||
@ -56,14 +56,12 @@ template<typename MatrixType> class Column
|
|||||||
Scalar& _write(int row, int col)
|
Scalar& _write(int row, int col)
|
||||||
{
|
{
|
||||||
EIGEN_UNUSED(col);
|
EIGEN_UNUSED(col);
|
||||||
EIGEN_CHECK_ROW_RANGE(*this, row);
|
|
||||||
return m_matrix.write(row, m_col);
|
return m_matrix.write(row, m_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
Scalar _read(int row, int col) const
|
Scalar _read(int row, int col) const
|
||||||
{
|
{
|
||||||
EIGEN_UNUSED(col);
|
EIGEN_UNUSED(col);
|
||||||
EIGEN_CHECK_ROW_RANGE(*this, row);
|
|
||||||
return m_matrix.read(row, m_col);
|
return m_matrix.read(row, m_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ template<typename Scalar, typename Derived>
|
|||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
void MatrixBase<Scalar, Derived>::_copy_helper(const MatrixBase<Scalar, OtherDerived>& other)
|
void MatrixBase<Scalar, Derived>::_copy_helper(const MatrixBase<Scalar, OtherDerived>& other)
|
||||||
{
|
{
|
||||||
if(SizeAtCompileTime != Dynamic && SizeAtCompileTime <= EIGEN_LOOP_UNROLLING_LIMIT)
|
if(SizeAtCompileTime != Dynamic && SizeAtCompileTime <= 25)
|
||||||
CopyHelperUnroller<SizeAtCompileTime, RowsAtCompileTime>::run(*this, other);
|
CopyHelperUnroller<SizeAtCompileTime, RowsAtCompileTime>::run(*this, other);
|
||||||
else
|
else
|
||||||
for(int i = 0; i < rows(); i++)
|
for(int i = 0; i < rows(); i++)
|
||||||
|
@ -51,13 +51,11 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols> >,
|
|||||||
|
|
||||||
const Scalar& _read(int row, int col) const
|
const Scalar& _read(int row, int col) const
|
||||||
{
|
{
|
||||||
EIGEN_CHECK_RANGES(*this, row, col);
|
|
||||||
return array()[row + col * Storage::_rows()];
|
return array()[row + col * Storage::_rows()];
|
||||||
}
|
}
|
||||||
|
|
||||||
Scalar& _write(int row, int col)
|
Scalar& _write(int row, int col)
|
||||||
{
|
{
|
||||||
EIGEN_CHECK_RANGES(*this, row, col);
|
|
||||||
return array()[row + col * Storage::_rows()];
|
return array()[row + col * Storage::_rows()];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,9 +78,23 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols> >,
|
|||||||
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Matrix, *=)
|
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Matrix, *=)
|
||||||
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Matrix, /=)
|
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Matrix, /=)
|
||||||
|
|
||||||
explicit Matrix() : Storage() {}
|
explicit Matrix() : Storage()
|
||||||
explicit Matrix(int dim) : Storage(dim) {}
|
{
|
||||||
explicit Matrix(int rows, int cols) : Storage(rows, cols) {}
|
assert(RowsAtCompileTime > 0 && ColsAtCompileTime > 0);
|
||||||
|
}
|
||||||
|
explicit Matrix(int dim) : Storage(dim)
|
||||||
|
{
|
||||||
|
assert(dim > 0);
|
||||||
|
assert((RowsAtCompileTime == 1
|
||||||
|
&& (ColsAtCompileTime == Dynamic || ColsAtCompileTime == dim))
|
||||||
|
|| (ColsAtCompileTime == 1
|
||||||
|
&& (RowsAtCompileTime == Dynamic || RowsAtCompileTime == dim)));
|
||||||
|
}
|
||||||
|
explicit Matrix(int rows, int cols) : Storage(rows, cols)
|
||||||
|
{
|
||||||
|
assert(rows > 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows)
|
||||||
|
&& cols > 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols));
|
||||||
|
}
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Matrix(const MatrixBase<Scalar, OtherDerived>& other)
|
Matrix(const MatrixBase<Scalar, OtherDerived>& other)
|
||||||
: Storage(other.rows(), other.cols())
|
: Storage(other.rows(), other.cols())
|
||||||
|
@ -52,11 +52,19 @@ template<typename Scalar, typename Derived> class MatrixBase
|
|||||||
|
|
||||||
Scalar& write(int row, int col)
|
Scalar& write(int row, int col)
|
||||||
{
|
{
|
||||||
|
// from this single point, we can check all writes to all matrix/expression
|
||||||
|
// types. We only want this however for internal testing, as this is very slow.
|
||||||
|
eigen_internal_assert(row >= 0 && row < rows()
|
||||||
|
&& col >= 0 && col < cols());
|
||||||
return static_cast<Derived *>(this)->_write(row, col);
|
return static_cast<Derived *>(this)->_write(row, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
Scalar read(int row, int col) const
|
Scalar read(int row, int col) const
|
||||||
{
|
{
|
||||||
|
// from this single point, we can check all reads to all matrix/expression
|
||||||
|
// types. We only want this however for internal testing, as this is very slow.
|
||||||
|
eigen_internal_assert(row >= 0 && row < rows()
|
||||||
|
&& col >= 0 && col < cols());
|
||||||
return static_cast<const Derived *>(this)->_read(row, col);
|
return static_cast<const Derived *>(this)->_read(row, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,8 +76,8 @@ template<typename Scalar, typename Derived> class MatrixBase
|
|||||||
return *static_cast<Derived*>(this);
|
return *static_cast<Derived*>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//special case of the above template operator=. Strangely, g++ 4.1 failed to use
|
//special case of the above template operator=, in order to prevent the compiler
|
||||||
//that template when OtherDerived == Derived
|
//from generating a default operator= (issue hit with g++ 4.1)
|
||||||
Derived& operator=(const MatrixBase& other)
|
Derived& operator=(const MatrixBase& other)
|
||||||
{
|
{
|
||||||
assert(rows() == other.rows() && cols() == other.cols());
|
assert(rows() == other.rows() && cols() == other.cols());
|
||||||
@ -149,23 +157,47 @@ template<typename Scalar, typename Derived> class MatrixBase
|
|||||||
Derived& operator/=(const std::complex<double>& other);
|
Derived& operator/=(const std::complex<double>& other);
|
||||||
|
|
||||||
Scalar operator()(int row, int col) const
|
Scalar operator()(int row, int col) const
|
||||||
{ return read(row, col); }
|
{
|
||||||
|
assert(row >= 0 && row < rows()
|
||||||
|
&& col >= 0 && col < cols());
|
||||||
|
return read(row, col);
|
||||||
|
}
|
||||||
|
|
||||||
Scalar& operator()(int row, int col)
|
Scalar& operator()(int row, int col)
|
||||||
{ return write(row, col); }
|
{
|
||||||
|
assert(row >= 0 && row < rows()
|
||||||
|
&& col >= 0 && col < cols());
|
||||||
|
return write(row, col);
|
||||||
|
}
|
||||||
|
|
||||||
Scalar operator[](int index) const
|
Scalar operator[](int index) const
|
||||||
{
|
{
|
||||||
assert(IsVector);
|
assert(IsVector);
|
||||||
if(RowsAtCompileTime == 1) return read(0, index);
|
if(RowsAtCompileTime == 1)
|
||||||
else return read(index, 0);
|
{
|
||||||
|
assert(index >= 0 && index < cols());
|
||||||
|
return read(0, index);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assert(index >= 0 && index < rows());
|
||||||
|
return read(index, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Scalar& operator[](int index)
|
Scalar& operator[](int index)
|
||||||
{
|
{
|
||||||
assert(IsVector);
|
assert(IsVector);
|
||||||
if(RowsAtCompileTime == 1) return write(0, index);
|
if(RowsAtCompileTime == 1)
|
||||||
else return write(index, 0);
|
{
|
||||||
|
assert(index >= 0 && index < cols());
|
||||||
|
return write(0, index);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assert(index >= 0 && index < rows());
|
||||||
|
return write(index, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Eval<Derived> eval() const EIGEN_ALWAYS_INLINE;
|
Eval<Derived> eval() const EIGEN_ALWAYS_INLINE;
|
||||||
|
@ -35,7 +35,11 @@ class MatrixStorage
|
|||||||
Scalar m_array[RowsAtCompileTime * ColsAtCompileTime];
|
Scalar m_array[RowsAtCompileTime * ColsAtCompileTime];
|
||||||
|
|
||||||
void resize(int rows, int cols)
|
void resize(int rows, int cols)
|
||||||
{ assert(rows == RowsAtCompileTime && cols == ColsAtCompileTime); }
|
{
|
||||||
|
EIGEN_ONLY_USED_FOR_DEBUG(rows);
|
||||||
|
EIGEN_ONLY_USED_FOR_DEBUG(cols);
|
||||||
|
assert(rows == RowsAtCompileTime && cols == ColsAtCompileTime);
|
||||||
|
}
|
||||||
|
|
||||||
int _rows() const
|
int _rows() const
|
||||||
{ return RowsAtCompileTime; }
|
{ return RowsAtCompileTime; }
|
||||||
@ -46,16 +50,12 @@ class MatrixStorage
|
|||||||
public:
|
public:
|
||||||
MatrixStorage() {}
|
MatrixStorage() {}
|
||||||
|
|
||||||
MatrixStorage(int dim)
|
MatrixStorage(int dim) { EIGEN_UNUSED(dim); }
|
||||||
{
|
|
||||||
assert((RowsAtCompileTime == 1 && ColsAtCompileTime == dim)
|
|
||||||
|| (ColsAtCompileTime == 1 && RowsAtCompileTime == dim));
|
|
||||||
}
|
|
||||||
|
|
||||||
MatrixStorage(int rows, int cols)
|
MatrixStorage(int rows, int cols)
|
||||||
{
|
{
|
||||||
assert(RowsAtCompileTime > 0 && ColsAtCompileTime > 0
|
EIGEN_UNUSED(rows);
|
||||||
&& rows == RowsAtCompileTime && cols == ColsAtCompileTime);
|
EIGEN_UNUSED(cols);
|
||||||
}
|
}
|
||||||
|
|
||||||
~MatrixStorage() {};
|
~MatrixStorage() {};
|
||||||
@ -70,6 +70,7 @@ class MatrixStorage<Scalar, Dynamic, ColsAtCompileTime>
|
|||||||
|
|
||||||
void resize(int rows, int cols)
|
void resize(int rows, int cols)
|
||||||
{
|
{
|
||||||
|
EIGEN_ONLY_USED_FOR_DEBUG(cols);
|
||||||
assert(rows > 0 && cols == ColsAtCompileTime);
|
assert(rows > 0 && cols == ColsAtCompileTime);
|
||||||
if(rows > m_rows)
|
if(rows > m_rows)
|
||||||
{
|
{
|
||||||
@ -88,13 +89,12 @@ class MatrixStorage<Scalar, Dynamic, ColsAtCompileTime>
|
|||||||
public:
|
public:
|
||||||
MatrixStorage(int dim) : m_rows(dim)
|
MatrixStorage(int dim) : m_rows(dim)
|
||||||
{
|
{
|
||||||
assert(m_rows > 0 && ColsAtCompileTime == 1);
|
|
||||||
m_array = new Scalar[m_rows * ColsAtCompileTime];
|
m_array = new Scalar[m_rows * ColsAtCompileTime];
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixStorage(int rows, int cols) : m_rows(rows)
|
MatrixStorage(int rows, int cols) : m_rows(rows)
|
||||||
{
|
{
|
||||||
assert(m_rows > 0 && cols == ColsAtCompileTime && ColsAtCompileTime > 0);
|
EIGEN_UNUSED(cols);
|
||||||
m_array = new Scalar[m_rows * ColsAtCompileTime];
|
m_array = new Scalar[m_rows * ColsAtCompileTime];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,6 +114,7 @@ class MatrixStorage<Scalar, RowsAtCompileTime, Dynamic>
|
|||||||
|
|
||||||
void resize(int rows, int cols)
|
void resize(int rows, int cols)
|
||||||
{
|
{
|
||||||
|
EIGEN_ONLY_USED_FOR_DEBUG(rows);
|
||||||
assert(rows == RowsAtCompileTime && cols > 0);
|
assert(rows == RowsAtCompileTime && cols > 0);
|
||||||
if(cols > m_cols)
|
if(cols > m_cols)
|
||||||
{
|
{
|
||||||
@ -132,13 +133,12 @@ class MatrixStorage<Scalar, RowsAtCompileTime, Dynamic>
|
|||||||
public:
|
public:
|
||||||
MatrixStorage(int dim) : m_cols(dim)
|
MatrixStorage(int dim) : m_cols(dim)
|
||||||
{
|
{
|
||||||
assert(m_cols > 0 && RowsAtCompileTime == 1);
|
|
||||||
m_array = new Scalar[m_cols * RowsAtCompileTime];
|
m_array = new Scalar[m_cols * RowsAtCompileTime];
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixStorage(int rows, int cols) : m_cols(cols)
|
MatrixStorage(int rows, int cols) : m_cols(cols)
|
||||||
{
|
{
|
||||||
assert(rows == RowsAtCompileTime && RowsAtCompileTime > 0 && cols > 0);
|
EIGEN_UNUSED(rows);
|
||||||
m_array = new Scalar[m_cols * RowsAtCompileTime];
|
m_array = new Scalar[m_cols * RowsAtCompileTime];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,9 +175,9 @@ class MatrixStorage<Scalar, Dynamic, Dynamic>
|
|||||||
{ return m_cols; }
|
{ return m_cols; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MatrixStorage(int rows, int cols) : m_rows(rows), m_cols(cols)
|
MatrixStorage(int rows, int cols) : m_rows(rows), m_cols(cols)
|
||||||
{
|
{
|
||||||
assert(m_rows > 0 && m_cols > 0);
|
|
||||||
m_array = new Scalar[m_rows * m_cols];
|
m_array = new Scalar[m_rows * m_cols];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,8 @@ template<typename MatrixType> class Minor
|
|||||||
int row, int col)
|
int row, int col)
|
||||||
: m_matrix(matrix), m_row(row), m_col(col)
|
: m_matrix(matrix), m_row(row), m_col(col)
|
||||||
{
|
{
|
||||||
EIGEN_CHECK_RANGES(matrix, row, col);
|
assert(row >= 0 && row < matrix.rows()
|
||||||
|
&& col >= 0 && col < matrix.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
Minor(const Minor& other)
|
Minor(const Minor& other)
|
||||||
|
@ -72,6 +72,7 @@ inline int sqrt(const int& x)
|
|||||||
// (the square root does not always exist within the integers).
|
// (the square root does not always exist within the integers).
|
||||||
// Please cast to a floating-point type.
|
// Please cast to a floating-point type.
|
||||||
assert(false);
|
assert(false);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
template<> inline int random()
|
template<> inline int random()
|
||||||
{
|
{
|
||||||
@ -158,6 +159,7 @@ inline std::complex<float> sqrt(const std::complex<float>& x)
|
|||||||
// as this is ambiguous (there are two square roots).
|
// as this is ambiguous (there are two square roots).
|
||||||
// What were you trying to do?
|
// What were you trying to do?
|
||||||
assert(false);
|
assert(false);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
template<> inline std::complex<float> random()
|
template<> inline std::complex<float> random()
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ template<typename MatrixType> class Row
|
|||||||
Row(const MatRef& matrix, int row)
|
Row(const MatRef& matrix, int row)
|
||||||
: m_matrix(matrix), m_row(row)
|
: m_matrix(matrix), m_row(row)
|
||||||
{
|
{
|
||||||
EIGEN_CHECK_ROW_RANGE(matrix, row);
|
assert(row >= 0 && row < matrix.rows());
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(const Row& other)
|
Row(const Row& other)
|
||||||
|
@ -32,13 +32,52 @@
|
|||||||
EIGEN_USING_MATRIX_TYPEDEFS \
|
EIGEN_USING_MATRIX_TYPEDEFS \
|
||||||
using Eigen::Matrix;
|
using Eigen::Matrix;
|
||||||
|
|
||||||
|
#ifdef EIGEN_INTERNAL_DEBUGGING
|
||||||
|
#define eigen_internal_assert(x) assert(x)
|
||||||
|
#else
|
||||||
|
#define eigen_internal_assert(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define EIGEN_UNUSED(x) (void)x
|
#define EIGEN_UNUSED(x) (void)x
|
||||||
#define EIGEN_CHECK_RANGES(matrix, row, col) \
|
|
||||||
assert(row >= 0 && row < (matrix).rows() && col >= 0 && col < (matrix).cols())
|
#ifdef NDEBUG
|
||||||
#define EIGEN_CHECK_ROW_RANGE(matrix, row) \
|
#define EIGEN_ONLY_USED_FOR_DEBUG(x) EIGEN_UNUSED(x)
|
||||||
assert(row >= 0 && row < (matrix).rows())
|
#else
|
||||||
#define EIGEN_CHECK_COL_RANGE(matrix, col) \
|
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
|
||||||
assert(col >= 0 && col < (matrix).cols())
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# define EIGEN_ALWAYS_INLINE __attribute__((always_inline))
|
||||||
|
# define EIGEN_RESTRICT /*__restrict__*/
|
||||||
|
#else
|
||||||
|
# define EIGEN_ALWAYS_INLINE
|
||||||
|
# define EIGEN_RESTRICT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
|
||||||
|
template<typename OtherScalar, typename OtherDerived> \
|
||||||
|
Derived& operator Op(const MatrixBase<OtherScalar, OtherDerived>& other) \
|
||||||
|
{ \
|
||||||
|
return MatrixBase<Scalar, Derived>::operator Op(other); \
|
||||||
|
} \
|
||||||
|
Derived& operator Op(const Derived& other) \
|
||||||
|
{ \
|
||||||
|
return MatrixBase<Scalar, Derived>::operator Op(other); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
|
||||||
|
template<typename Other> \
|
||||||
|
Derived& operator Op(const Other& scalar) \
|
||||||
|
{ \
|
||||||
|
return MatrixBase<Scalar, Derived>::operator Op(scalar); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
|
||||||
|
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) \
|
||||||
|
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \
|
||||||
|
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \
|
||||||
|
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \
|
||||||
|
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
|
||||||
|
|
||||||
//forward declarations
|
//forward declarations
|
||||||
template<typename _Scalar, int _Rows, int _Cols> class Matrix;
|
template<typename _Scalar, int _Rows, int _Cols> class Matrix;
|
||||||
@ -75,41 +114,4 @@ struct ForwardDecl<Matrix<_Scalar, _Rows, _Cols> >
|
|||||||
|
|
||||||
const int Dynamic = -1;
|
const int Dynamic = -1;
|
||||||
|
|
||||||
#define EIGEN_LOOP_UNROLLING_LIMIT 25
|
|
||||||
|
|
||||||
#define EIGEN_UNUSED(x) (void)x
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define EIGEN_ALWAYS_INLINE __attribute__((always_inline))
|
|
||||||
# define EIGEN_RESTRICT /*__restrict__*/
|
|
||||||
#else
|
|
||||||
# define EIGEN_ALWAYS_INLINE
|
|
||||||
# define EIGEN_RESTRICT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
|
|
||||||
template<typename OtherScalar, typename OtherDerived> \
|
|
||||||
Derived& operator Op(const MatrixBase<OtherScalar, OtherDerived>& other) \
|
|
||||||
{ \
|
|
||||||
return MatrixBase<Scalar, Derived>::operator Op(other); \
|
|
||||||
} \
|
|
||||||
Derived& operator Op(const Derived& other) \
|
|
||||||
{ \
|
|
||||||
return MatrixBase<Scalar, Derived>::operator Op(other); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
|
|
||||||
template<typename Other> \
|
|
||||||
Derived& operator Op(const Other& scalar) \
|
|
||||||
{ \
|
|
||||||
return MatrixBase<Scalar, Derived>::operator Op(scalar); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) \
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \
|
|
||||||
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \
|
|
||||||
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
|
|
||||||
|
|
||||||
#endif // EIGEN_UTIL_H
|
#endif // EIGEN_UTIL_H
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#define EIGEN_TEST_MAIN_H
|
#define EIGEN_TEST_MAIN_H
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
|
#define EIGEN_INTERNAL_DEBUGGING
|
||||||
#include "../src/Core.h"
|
#include "../src/Core.h"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user