diff options
author | Igor Krivenko <anonymous@invalid.net> | 2011-12-09 23:38:41 +0100 |
---|---|---|
committer | Igor Krivenko <anonymous@invalid.net> | 2011-12-09 23:38:41 +0100 |
commit | 36457178f9d12481e699d07c0ac8d25a7e6a854f (patch) | |
tree | e9b12b3ed7e4102fcf1d0c4384fec3c1d4c94f37 /Eigen/src/Core/products | |
parent | d400a6245ec0d86b0e3dd2af30e49349ae28b0f0 (diff) |
bug #352:properly cast constants
Diffstat (limited to 'Eigen/src/Core/products')
-rw-r--r-- | Eigen/src/Core/products/SelfadjointMatrixVector.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/products/TriangularSolverMatrix.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/products/SelfadjointMatrixVector.h b/Eigen/src/Core/products/SelfadjointMatrixVector.h index 14419e168..80ecd20f9 100644 --- a/Eigen/src/Core/products/SelfadjointMatrixVector.h +++ b/Eigen/src/Core/products/SelfadjointMatrixVector.h @@ -92,9 +92,9 @@ static EIGEN_DONT_INLINE void run( Scalar t1 = cjAlpha * rhs[j+1]; Packet ptmp1 = pset1<Packet>(t1); - Scalar t2 = 0; + Scalar t2(0); Packet ptmp2 = pset1<Packet>(t2); - Scalar t3 = 0; + Scalar t3(0); Packet ptmp3 = pset1<Packet>(t3); size_t starti = FirstTriangular ? 0 : j+2; @@ -155,7 +155,7 @@ static EIGEN_DONT_INLINE void run( register const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride; Scalar t1 = cjAlpha * rhs[j]; - Scalar t2 = 0; + Scalar t2(0); // TODO make sure this product is a real * complex and that the rhs is properly conjugated if needed res[j] += cjd.pmul(internal::real(A0[j]), t1); for (Index i=FirstTriangular ? 0 : j+1; i<(FirstTriangular ? j : size); i++) diff --git a/Eigen/src/Core/products/TriangularSolverMatrix.h b/Eigen/src/Core/products/TriangularSolverMatrix.h index 05d1a2840..6caa6b717 100644 --- a/Eigen/src/Core/products/TriangularSolverMatrix.h +++ b/Eigen/src/Core/products/TriangularSolverMatrix.h @@ -128,7 +128,7 @@ struct triangular_solve_matrix<Scalar,Index,OnTheLeft,Mode,Conjugate,TriStorageO { if (TriStorageOrder==RowMajor) { - Scalar b = 0; + Scalar b(0); const Scalar* l = &tri(i,s); Scalar* r = &other(s,j); for (Index i3=0; i3<k; ++i3) |