aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-17 14:30:01 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-17 14:30:01 +0000
commit89f468671dea2cc1dc37cdf75bbc7c7e56749bac (patch)
tree6c8b704fedcb168e2db20523d99dd061aabd2e88 /Eigen/src/Core
parent2110cca4313ebb902ca1f4f6ff0c389f743e60fc (diff)
* replace postfix ++ by prefix ++ wherever that makes sense in Eigen/
* fix some "unused variable" warnings in the tests; there remains a libstdc++ "deprecated" warning which I haven't looked much into
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r--Eigen/src/Core/Assign.h20
-rw-r--r--Eigen/src/Core/CacheFriendlyProduct.h20
-rw-r--r--Eigen/src/Core/CommaInitializer.h2
-rw-r--r--Eigen/src/Core/CwiseNullaryOp.h14
-rw-r--r--Eigen/src/Core/DiagonalMatrix.h6
-rw-r--r--Eigen/src/Core/Dot.h8
-rw-r--r--Eigen/src/Core/Fuzzy.h6
-rw-r--r--Eigen/src/Core/IO.h8
-rw-r--r--Eigen/src/Core/Part.h36
-rw-r--r--Eigen/src/Core/Product.h6
-rw-r--r--Eigen/src/Core/Redux.h6
-rw-r--r--Eigen/src/Core/Sum.h10
-rw-r--r--Eigen/src/Core/Visitor.h6
-rw-r--r--Eigen/src/Core/util/Macros.h2
14 files changed, 75 insertions, 75 deletions
diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h
index 11f35c5e7..bcb3e9e7e 100644
--- a/Eigen/src/Core/Assign.h
+++ b/Eigen/src/Core/Assign.h
@@ -214,8 +214,8 @@ struct ei_assign_impl<Derived1, Derived2, NoVectorization, NoUnrolling>
{
const int innerSize = dst.innerSize();
const int outerSize = dst.outerSize();
- for(int j = 0; j < outerSize; j++)
- for(int i = 0; i < innerSize; i++)
+ for(int j = 0; j < outerSize; ++j)
+ for(int i = 0; i < innerSize; ++i)
{
if(int(Derived1::Flags)&RowMajorBit)
dst.copyCoeff(j, i, src);
@@ -243,7 +243,7 @@ struct ei_assign_impl<Derived1, Derived2, NoVectorization, InnerUnrolling>
const bool rowMajor = int(Derived1::Flags)&RowMajorBit;
const int innerSize = rowMajor ? Derived1::ColsAtCompileTime : Derived1::RowsAtCompileTime;
const int outerSize = dst.outerSize();
- for(int j = 0; j < outerSize; j++)
+ for(int j = 0; j < outerSize; ++j)
ei_assign_novec_InnerUnrolling<Derived1, Derived2, 0, innerSize>
::run(dst, src, j);
}
@@ -261,7 +261,7 @@ struct ei_assign_impl<Derived1, Derived2, InnerVectorization, NoUnrolling>
const int innerSize = dst.innerSize();
const int outerSize = dst.outerSize();
const int packetSize = ei_packet_traits<typename Derived1::Scalar>::size;
- for(int j = 0; j < outerSize; j++)
+ for(int j = 0; j < outerSize; ++j)
for(int i = 0; i < innerSize; i+=packetSize)
{
if(int(Derived1::Flags)&RowMajorBit)
@@ -290,7 +290,7 @@ struct ei_assign_impl<Derived1, Derived2, InnerVectorization, InnerUnrolling>
const bool rowMajor = int(Derived1::Flags)&RowMajorBit;
const int innerSize = rowMajor ? Derived1::ColsAtCompileTime : Derived1::RowsAtCompileTime;
const int outerSize = dst.outerSize();
- for(int j = 0; j < outerSize; j++)
+ for(int j = 0; j < outerSize; ++j)
ei_assign_innervec_InnerUnrolling<Derived1, Derived2, 0, innerSize>
::run(dst, src, j);
}
@@ -311,7 +311,7 @@ struct ei_assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>
: ei_alignmentOffset(&dst.coeffRef(0), size);
const int alignedEnd = alignedStart + ((size-alignedStart)/packetSize)*packetSize;
- for(int index = 0; index < alignedStart; index++)
+ for(int index = 0; index < alignedStart; ++index)
dst.copyCoeff(index, src);
for(int index = alignedStart; index < alignedEnd; index += packetSize)
@@ -319,7 +319,7 @@ struct ei_assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>
dst.template copyPacket<Derived2, Aligned, ei_assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);
}
- for(int index = alignedEnd; index < size; index++)
+ for(int index = alignedEnd; index < size; ++index)
dst.copyCoeff(index, src);
}
};
@@ -355,12 +355,12 @@ struct ei_assign_impl<Derived1, Derived2, SliceVectorization, NoUnrolling>
int alignedStart = ei_assign_traits<Derived1,Derived2>::DstIsAligned ? 0
: ei_alignmentOffset(&dst.coeffRef(0), innerSize);
- for(int i = 0; i < outerSize; i++)
+ for(int i = 0; i < outerSize; ++i)
{
const int alignedEnd = alignedStart + ((innerSize-alignedStart) & ~packetAlignedMask);
// do the non-vectorizable part of the assignment
- for (int index = 0; index<alignedStart ; index++)
+ for (int index = 0; index<alignedStart ; ++index)
{
if(Derived1::Flags&RowMajorBit)
dst.copyCoeff(i, index, src);
@@ -378,7 +378,7 @@ struct ei_assign_impl<Derived1, Derived2, SliceVectorization, NoUnrolling>
}
// do the non-vectorizable part of the assignment
- for (int index = alignedEnd; index<innerSize ; index++)
+ for (int index = alignedEnd; index<innerSize ; ++index)
{
if(Derived1::Flags&RowMajorBit)
dst.copyCoeff(i, index, src);
diff --git a/Eigen/src/Core/CacheFriendlyProduct.h b/Eigen/src/Core/CacheFriendlyProduct.h
index ac1114668..928b50cfa 100644
--- a/Eigen/src/Core/CacheFriendlyProduct.h
+++ b/Eigen/src/Core/CacheFriendlyProduct.h
@@ -433,7 +433,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
{
/* explicit vectorization */
// process initial unaligned coeffs
- for (int j=0; j<alignedStart; j++)
+ for (int j=0; j<alignedStart; ++j)
res[j] += ei_pfirst(ptmp0)*lhs0[j] + ei_pfirst(ptmp1)*lhs1[j] + ei_pfirst(ptmp2)*lhs2[j] + ei_pfirst(ptmp3)*lhs3[j];
if (alignedSize>alignedStart)
@@ -493,7 +493,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
} // end explicit vectorization
/* process remaining coeffs (or all if there is no explicit vectorization) */
- for (int j=alignedSize; j<size; j++)
+ for (int j=alignedSize; j<size; ++j)
res[j] += ei_pfirst(ptmp0)*lhs0[j] + ei_pfirst(ptmp1)*lhs1[j] + ei_pfirst(ptmp2)*lhs2[j] + ei_pfirst(ptmp3)*lhs3[j];
}
@@ -502,7 +502,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
int start = columnBound;
do
{
- for (int i=start; i<end; i++)
+ for (int i=start; i<end; ++i)
{
Packet ptmp0 = ei_pset1(rhs[i]);
const Scalar* lhs0 = lhs + i*lhsStride;
@@ -511,7 +511,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
{
/* explicit vectorization */
// process first unaligned result's coeffs
- for (int j=0; j<alignedStart; j++)
+ for (int j=0; j<alignedStart; ++j)
res[j] += ei_pfirst(ptmp0) * lhs0[j];
// process aligned result's coeffs
@@ -524,7 +524,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
}
// process remaining scalars (or all if no explicit vectorization)
- for (int j=alignedSize; j<size; j++)
+ for (int j=alignedSize; j<size; ++j)
res[j] += ei_pfirst(ptmp0) * lhs0[j];
}
if (skipColumns)
@@ -624,7 +624,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_rowmajor_times_vector(
// process initial unaligned coeffs
// FIXME this loop get vectorized by the compiler !
- for (int j=0; j<alignedStart; j++)
+ for (int j=0; j<alignedStart; ++j)
{
Scalar b = rhs[j];
tmp0 += b*lhs0[j]; tmp1 += b*lhs1[j]; tmp2 += b*lhs2[j]; tmp3 += b*lhs3[j];
@@ -695,7 +695,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_rowmajor_times_vector(
// process remaining coeffs (or all if no explicit vectorization)
// FIXME this loop get vectorized by the compiler !
- for (int j=alignedSize; j<size; j++)
+ for (int j=alignedSize; j<size; ++j)
{
Scalar b = rhs[j];
tmp0 += b*lhs0[j]; tmp1 += b*lhs1[j]; tmp2 += b*lhs2[j]; tmp3 += b*lhs3[j];
@@ -708,14 +708,14 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_rowmajor_times_vector(
int start = rowBound;
do
{
- for (int i=start; i<end; i++)
+ for (int i=start; i<end; ++i)
{
Scalar tmp0 = Scalar(0);
Packet ptmp0 = ei_pset1(tmp0);
const Scalar* lhs0 = lhs + i*lhsStride;
// process first unaligned result's coeffs
// FIXME this loop get vectorized by the compiler !
- for (int j=0; j<alignedStart; j++)
+ for (int j=0; j<alignedStart; ++j)
tmp0 += rhs[j] * lhs0[j];
if (alignedSize>alignedStart)
@@ -732,7 +732,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_rowmajor_times_vector(
// process remaining scalars
// FIXME this loop get vectorized by the compiler !
- for (int j=alignedSize; j<size; j++)
+ for (int j=alignedSize; j<size; ++j)
tmp0 += rhs[j] * lhs0[j];
res[i] += tmp0;
}
diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h
index 83cff0bca..178f5ea0f 100644
--- a/Eigen/src/Core/CommaInitializer.h
+++ b/Eigen/src/Core/CommaInitializer.h
@@ -67,7 +67,7 @@ struct CommaInitializer
ei_assert(m_col<m_matrix.cols()
&& "Too many coefficients passed to comma initializer (operator<<)");
ei_assert(m_currentBlockRows==1);
- m_matrix.coeffRef(m_row, m_col++) = s;
+ m_matrix.coeffRef(m_row, ++m_col) = s;
return *this;
}
diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h
index fb63ad4fd..32cc12d4e 100644
--- a/Eigen/src/Core/CwiseNullaryOp.h
+++ b/Eigen/src/Core/CwiseNullaryOp.h
@@ -236,8 +236,8 @@ template<typename Derived>
bool MatrixBase<Derived>::isApproxToConstant
(const Scalar& value, RealScalar prec) const
{
- for(int j = 0; j < cols(); j++)
- for(int i = 0; i < rows(); i++)
+ for(int j = 0; j < cols(); ++j)
+ for(int i = 0; i < rows(); ++i)
if(!ei_isApprox(coeff(i, j), value, prec))
return false;
return true;
@@ -330,8 +330,8 @@ template<typename Derived>
bool MatrixBase<Derived>::isZero
(RealScalar prec) const
{
- for(int j = 0; j < cols(); j++)
- for(int i = 0; i < rows(); i++)
+ for(int j = 0; j < cols(); ++j)
+ for(int i = 0; i < rows(); ++i)
if(!ei_isMuchSmallerThan(coeff(i, j), static_cast<Scalar>(1), prec))
return false;
return true;
@@ -499,9 +499,9 @@ template<typename Derived>
bool MatrixBase<Derived>::isIdentity
(RealScalar prec) const
{
- for(int j = 0; j < cols(); j++)
+ for(int j = 0; j < cols(); ++j)
{
- for(int i = 0; i < rows(); i++)
+ for(int i = 0; i < rows(); ++i)
{
if(i == j)
{
@@ -534,7 +534,7 @@ struct ei_setIdentity_impl<Derived, true>
{
m.setZero();
const int size = std::min(m.rows(), m.cols());
- for(int i = 0; i < size; i++) m.coeffRef(i,i) = typename Derived::Scalar(1);
+ for(int i = 0; i < size; ++i) m.coeffRef(i,i) = typename Derived::Scalar(1);
return m;
}
};
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h
index e09797eaf..25fa26953 100644
--- a/Eigen/src/Core/DiagonalMatrix.h
+++ b/Eigen/src/Core/DiagonalMatrix.h
@@ -123,13 +123,13 @@ bool MatrixBase<Derived>::isDiagonal
{
if(cols() != rows()) return false;
RealScalar maxAbsOnDiagonal = static_cast<RealScalar>(-1);
- for(int j = 0; j < cols(); j++)
+ for(int j = 0; j < cols(); ++j)
{
RealScalar absOnDiagonal = ei_abs(coeff(j,j));
if(absOnDiagonal > maxAbsOnDiagonal) maxAbsOnDiagonal = absOnDiagonal;
}
- for(int j = 0; j < cols(); j++)
- for(int i = 0; i < j; i++)
+ for(int j = 0; j < cols(); ++j)
+ for(int i = 0; i < j; ++i)
{
if(!ei_isMuchSmallerThan(coeff(i, j), maxAbsOnDiagonal, prec)) return false;
if(!ei_isMuchSmallerThan(coeff(j, i), maxAbsOnDiagonal, prec)) return false;
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h
index e700b76ae..c4703adc3 100644
--- a/Eigen/src/Core/Dot.h
+++ b/Eigen/src/Core/Dot.h
@@ -156,7 +156,7 @@ struct ei_dot_impl<Derived1, Derived2, NoVectorization, NoUnrolling>
ei_assert(v1.size()>0 && "you are using a non initialized vector");
Scalar res;
res = v1.coeff(0) * ei_conj(v2.coeff(0));
- for(int i = 1; i < v1.size(); i++)
+ for(int i = 1; i < v1.size(); ++i)
res += v1.coeff(i) * ei_conj(v2.coeff(i));
return res;
}
@@ -211,7 +211,7 @@ struct ei_dot_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>
}
// do the remainder of the vector
- for(int index = alignedSize; index < size; index++)
+ for(int index = alignedSize; index < size; ++index)
{
res += v1.coeff(index) * v2.coeff(index);
}
@@ -370,11 +370,11 @@ template<typename Derived>
bool MatrixBase<Derived>::isUnitary(RealScalar prec) const
{
typename Derived::Nested nested(derived());
- for(int i = 0; i < cols(); i++)
+ for(int i = 0; i < cols(); ++i)
{
if(!ei_isApprox(nested.col(i).squaredNorm(), static_cast<Scalar>(1), prec))
return false;
- for(int j = 0; j < i; j++)
+ for(int j = 0; j < i; ++j)
if(!ei_isMuchSmallerThan(nested.col(i).dot(nested.col(j)), static_cast<Scalar>(1), prec))
return false;
}
diff --git a/Eigen/src/Core/Fuzzy.h b/Eigen/src/Core/Fuzzy.h
index 18150cc6d..128554296 100644
--- a/Eigen/src/Core/Fuzzy.h
+++ b/Eigen/src/Core/Fuzzy.h
@@ -202,7 +202,7 @@ struct ei_fuzzy_selector<Derived,OtherDerived,false>
ei_assert(self.rows() == other.rows() && self.cols() == other.cols());
typename Derived::Nested nested(self);
typename OtherDerived::Nested otherNested(other);
- for(int i = 0; i < self.cols(); i++)
+ for(int i = 0; i < self.cols(); ++i)
if((nested.col(i) - otherNested.col(i)).squaredNorm()
> std::min(nested.col(i).squaredNorm(), otherNested.col(i).squaredNorm()) * prec * prec)
return false;
@@ -211,7 +211,7 @@ struct ei_fuzzy_selector<Derived,OtherDerived,false>
static bool isMuchSmallerThan(const Derived& self, const RealScalar& other, RealScalar prec)
{
typename Derived::Nested nested(self);
- for(int i = 0; i < self.cols(); i++)
+ for(int i = 0; i < self.cols(); ++i)
if(nested.col(i).squaredNorm() > ei_abs2(other * prec))
return false;
return true;
@@ -222,7 +222,7 @@ struct ei_fuzzy_selector<Derived,OtherDerived,false>
ei_assert(self.rows() == other.rows() && self.cols() == other.cols());
typename Derived::Nested nested(self);
typename OtherDerived::Nested otherNested(other);
- for(int i = 0; i < self.cols(); i++)
+ for(int i = 0; i < self.cols(); ++i)
if(nested.col(i).squaredNorm() > otherNested.col(i).squaredNorm() * prec * prec)
return false;
return true;
diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h
index 6e6d02ad4..ca00cae3d 100644
--- a/Eigen/src/Core/IO.h
+++ b/Eigen/src/Core/IO.h
@@ -129,8 +129,8 @@ std::ostream & ei_print_matrix(std::ostream & s, const MatrixBase<Derived> & _m,
if (fmt.flags & AlignCols)
{
// compute the largest width
- for(int j = 1; j < m.cols(); j++)
- for(int i = 0; i < m.rows(); i++)
+ for(int j = 1; j < m.cols(); ++j)
+ for(int i = 0; i < m.rows(); ++i)
{
std::stringstream sstr;
sstr.precision(fmt.precision);
@@ -140,14 +140,14 @@ std::ostream & ei_print_matrix(std::ostream & s, const MatrixBase<Derived> & _m,
}
s.precision(fmt.precision);
s << fmt.matPrefix;
- for(int i = 0; i < m.rows(); i++)
+ for(int i = 0; i < m.rows(); ++i)
{
if (i)
s << fmt.rowSpacer;
s << fmt.rowPrefix;
if(width) s.width(width);
s << m.coeff(i, 0);
- for(int j = 1; j < m.cols(); j++)
+ for(int j = 1; j < m.cols(); ++j)
{
s << fmt.coeffSeparator;
if (width) s.width(width);
diff --git a/Eigen/src/Core/Part.h b/Eigen/src/Core/Part.h
index 3928f51d3..3cb55fe1d 100644
--- a/Eigen/src/Core/Part.h
+++ b/Eigen/src/Core/Part.h
@@ -219,8 +219,8 @@ struct ei_part_assignment_impl<Derived1, Derived2, Upper, Dynamic>
{
inline static void run(Derived1 &dst, const Derived2 &src)
{
- for(int j = 0; j < dst.cols(); j++)
- for(int i = 0; i <= j; i++)
+ for(int j = 0; j < dst.cols(); ++j)
+ for(int i = 0; i <= j; ++i)
dst.copyCoeff(i, j, src);
}
};
@@ -230,8 +230,8 @@ struct ei_part_assignment_impl<Derived1, Derived2, Lower, Dynamic>
{
inline static void run(Derived1 &dst, const Derived2 &src)
{
- for(int j = 0; j < dst.cols(); j++)
- for(int i = j; i < dst.rows(); i++)
+ for(int j = 0; j < dst.cols(); ++j)
+ for(int i = j; i < dst.rows(); ++i)
dst.copyCoeff(i, j, src);
}
};
@@ -241,8 +241,8 @@ struct ei_part_assignment_impl<Derived1, Derived2, StrictlyUpper, Dynamic>
{
inline static void run(Derived1 &dst, const Derived2 &src)
{
- for(int j = 0; j < dst.cols(); j++)
- for(int i = 0; i < j; i++)
+ for(int j = 0; j < dst.cols(); ++j)
+ for(int i = 0; i < j; ++i)
dst.copyCoeff(i, j, src);
}
};
@@ -251,8 +251,8 @@ struct ei_part_assignment_impl<Derived1, Derived2, StrictlyLower, Dynamic>
{
inline static void run(Derived1 &dst, const Derived2 &src)
{
- for(int j = 0; j < dst.cols(); j++)
- for(int i = j+1; i < dst.rows(); i++)
+ for(int j = 0; j < dst.cols(); ++j)
+ for(int i = j+1; i < dst.rows(); ++i)
dst.copyCoeff(i, j, src);
}
};
@@ -261,9 +261,9 @@ struct ei_part_assignment_impl<Derived1, Derived2, SelfAdjoint, Dynamic>
{
inline static void run(Derived1 &dst, const Derived2 &src)
{
- for(int j = 0; j < dst.cols(); j++)
+ for(int j = 0; j < dst.cols(); ++j)
{
- for(int i = 0; i < j; i++)
+ for(int i = 0; i < j; ++i)
dst.coeffRef(j, i) = ei_conj(dst.coeffRef(i, j) = src.coeff(i, j));
dst.coeffRef(j, j) = ei_real(src.coeff(j, j));
}
@@ -312,14 +312,14 @@ bool MatrixBase<Derived>::isUpper(RealScalar prec) const
{
if(cols() != rows()) return false;
RealScalar maxAbsOnUpperPart = static_cast<RealScalar>(-1);
- for(int j = 0; j < cols(); j++)
- for(int i = 0; i <= j; i++)
+ for(int j = 0; j < cols(); ++j)
+ for(int i = 0; i <= j; ++i)
{
RealScalar absValue = ei_abs(coeff(i,j));
if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
}
- for(int j = 0; j < cols()-1; j++)
- for(int i = j+1; i < rows(); i++)
+ for(int j = 0; j < cols()-1; ++j)
+ for(int i = j+1; i < rows(); ++i)
if(!ei_isMuchSmallerThan(coeff(i, j), maxAbsOnUpperPart, prec)) return false;
return true;
}
@@ -334,14 +334,14 @@ bool MatrixBase<Derived>::isLower(RealScalar prec) const
{
if(cols() != rows()) return false;
RealScalar maxAbsOnLowerPart = static_cast<RealScalar>(-1);
- for(int j = 0; j < cols(); j++)
- for(int i = j; i < rows(); i++)
+ for(int j = 0; j < cols(); ++j)
+ for(int i = j; i < rows(); ++i)
{
RealScalar absValue = ei_abs(coeff(i,j));
if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
}
- for(int j = 1; j < cols(); j++)
- for(int i = 0; i < j; i++)
+ for(int j = 1; j < cols(); ++j)
+ for(int i = 0; i < j; ++i)
if(!ei_isMuchSmallerThan(coeff(i, j), maxAbsOnLowerPart, prec)) return false;
return true;
}
diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h
index b464304f8..a844470a7 100644
--- a/Eigen/src/Core/Product.h
+++ b/Eigen/src/Core/Product.h
@@ -337,7 +337,7 @@ struct ei_product_coeff_impl<NoVectorization, Dynamic, Lhs, Rhs>
{
ei_assert(lhs.cols()>0 && "you are using a non initialized matrix");
res = lhs.coeff(row, 0) * rhs.coeff(0, col);
- for(int i = 1; i < lhs.cols(); i++)
+ for(int i = 1; i < lhs.cols(); ++i)
res += lhs.coeff(row, i) * rhs.coeff(i, col);
}
};
@@ -495,7 +495,7 @@ struct ei_product_packet_impl<RowMajor, Dynamic, Lhs, Rhs, PacketScalar, LoadMod
{
ei_assert(lhs.cols()>0 && "you are using a non initialized matrix");
res = ei_pmul(ei_pset1(lhs.coeff(row, 0)),rhs.template packet<LoadMode>(0, col));
- for(int i = 1; i < lhs.cols(); i++)
+ for(int i = 1; i < lhs.cols(); ++i)
res = ei_pmadd(ei_pset1(lhs.coeff(row, i)), rhs.template packet<LoadMode>(i, col), res);
}
};
@@ -507,7 +507,7 @@ struct ei_product_packet_impl<ColMajor, Dynamic, Lhs, Rhs, PacketScalar, LoadMod
{
ei_assert(lhs.cols()>0 && "you are using a non initialized matrix");
res = ei_pmul(lhs.template packet<LoadMode>(row, 0), ei_pset1(rhs.coeff(0, col)));
- for(int i = 1; i < lhs.cols(); i++)
+ for(int i = 1; i < lhs.cols(); ++i)
res = ei_pmadd(lhs.template packet<LoadMode>(row, i), ei_pset1(rhs.coeff(i, col)), res);
}
};
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h
index 7dec894ff..734ef1929 100644
--- a/Eigen/src/Core/Redux.h
+++ b/Eigen/src/Core/Redux.h
@@ -68,10 +68,10 @@ struct ei_redux_impl<BinaryOp, Derived, Start, Dynamic>
ei_assert(mat.rows()>0 && mat.cols()>0 && "you are using a non initialized matrix");
Scalar res;
res = mat.coeff(0,0);
- for(int i = 1; i < mat.rows(); i++)
+ for(int i = 1; i < mat.rows(); ++i)
res = func(res, mat.coeff(i, 0));
- for(int j = 1; j < mat.cols(); j++)
- for(int i = 0; i < mat.rows(); i++)
+ for(int j = 1; j < mat.cols(); ++j)
+ for(int i = 0; i < mat.rows(); ++i)
res = func(res, mat.coeff(i, j));
return res;
}
diff --git a/Eigen/src/Core/Sum.h b/Eigen/src/Core/Sum.h
index 4247bffcc..45ef62205 100644
--- a/Eigen/src/Core/Sum.h
+++ b/Eigen/src/Core/Sum.h
@@ -168,10 +168,10 @@ struct ei_sum_impl<Derived, NoVectorization, NoUnrolling>
ei_assert(mat.rows()>0 && mat.cols()>0 && "you are using a non initialized matrix");
Scalar res;
res = mat.coeff(0, 0);
- for(int i = 1; i < mat.rows(); i++)
+ for(int i = 1; i < mat.rows(); ++i)
res += mat.coeff(i, 0);
- for(int j = 1; j < mat.cols(); j++)
- for(int i = 0; i < mat.rows(); i++)
+ for(int j = 1; j < mat.cols(); ++j)
+ for(int i = 0; i < mat.rows(); ++i)
res += mat.coeff(i, j);
return res;
}
@@ -217,10 +217,10 @@ struct ei_sum_impl<Derived, LinearVectorization, NoUnrolling>
res = Scalar(0);
}
- for(int index = 0; index < alignedStart; index++)
+ for(int index = 0; index < alignedStart; ++index)
res += mat.coeff(index);
- for(int index = alignedEnd; index < size; index++)
+ for(int index = alignedEnd; index < size; ++index)
res += mat.coeff(index);
return res;
diff --git a/Eigen/src/Core/Visitor.h b/Eigen/src/Core/Visitor.h
index 041aa9445..a9ef5c861 100644
--- a/Eigen/src/Core/Visitor.h
+++ b/Eigen/src/Core/Visitor.h
@@ -55,10 +55,10 @@ struct ei_visitor_impl<Visitor, Derived, Dynamic>
inline static void run(const Derived& mat, Visitor& visitor)
{
visitor.init(mat.coeff(0,0), 0, 0);
- for(int i = 1; i < mat.rows(); i++)
+ for(int i = 1; i < mat.rows(); ++i)
visitor(mat.coeff(i, 0), i, 0);
- for(int j = 1; j < mat.cols(); j++)
- for(int i = 0; i < mat.rows(); i++)
+ for(int j = 1; j < mat.cols(); ++j)
+ for(int i = 0; i < mat.rows(); ++i)
visitor(mat.coeff(i, j), i, j);
}
};
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index 274d59057..4d6905964 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -107,7 +107,7 @@ using Eigen::ei_cos;
#endif
#if (defined __GNUC__)
-#define EIGEN_ALIGN_128 __attribute__ ((aligned(16)))
+#define EIGEN_ALIGN_128 __attribute__((aligned(16)))
#elif (defined _MSC_VER)
#define EIGEN_ALIGN_128 __declspec(align(16))
#else