aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Sum.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/Sum.h')
-rw-r--r--Eigen/src/Core/Sum.h10
1 files changed, 5 insertions, 5 deletions
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;