change the value of Dynamic to -1, since the index type is now configurable.

remove EIGEN_ENUM_MIN/MAX, implement new macros instead
This commit is contained in:
Benoit Jacob
2010-06-11 07:56:50 -04:00
parent 52e8c42a00
commit bdd7c6c88a
33 changed files with 171 additions and 99 deletions

View File

@@ -508,8 +508,10 @@ template<typename MatrixType, unsigned int Mode>
template<typename OtherDerived>
void TriangularView<MatrixType, Mode>::lazyAssign(const MatrixBase<OtherDerived>& other)
{
const bool unroll = MatrixType::SizeAtCompileTime * ei_traits<OtherDerived>::CoeffReadCost / 2
<= EIGEN_UNROLLING_LIMIT;
const bool unroll = MatrixType::SizeAtCompileTime != Dynamic
&& ei_traits<OtherDerived>::CoeffReadCost != Dynamic
&& MatrixType::SizeAtCompileTime * ei_traits<OtherDerived>::CoeffReadCost / 2
<= EIGEN_UNROLLING_LIMIT;
ei_assert(m_matrix.rows() == other.rows() && m_matrix.cols() == other.cols());
ei_triangular_assignment_selector
@@ -542,8 +544,10 @@ template<typename MatrixType, unsigned int Mode>
template<typename OtherDerived>
void TriangularView<MatrixType, Mode>::lazyAssign(const TriangularBase<OtherDerived>& other)
{
const bool unroll = MatrixType::SizeAtCompileTime * ei_traits<OtherDerived>::CoeffReadCost / 2
<= EIGEN_UNROLLING_LIMIT;
const bool unroll = MatrixType::SizeAtCompileTime != Dynamic
&& ei_traits<OtherDerived>::CoeffReadCost != Dynamic
&& MatrixType::SizeAtCompileTime * ei_traits<OtherDerived>::CoeffReadCost / 2
<= EIGEN_UNROLLING_LIMIT;
ei_assert(m_matrix.rows() == other.rows() && m_matrix.cols() == other.cols());
ei_triangular_assignment_selector
@@ -579,8 +583,10 @@ template<typename Derived>
template<typename DenseDerived>
void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived> &other) const
{
const bool unroll = DenseDerived::SizeAtCompileTime * Derived::CoeffReadCost / 2
<= EIGEN_UNROLLING_LIMIT;
const bool unroll = DenseDerived::SizeAtCompileTime != Dynamic
&& ei_traits<Derived>::CoeffReadCost != Dynamic
&& DenseDerived::SizeAtCompileTime * ei_traits<Derived>::CoeffReadCost / 2
<= EIGEN_UNROLLING_LIMIT;
ei_assert(this->rows() == other.rows() && this->cols() == other.cols());
ei_triangular_assignment_selector