aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/products/SelfadjointRank2Update.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-05-30 16:00:58 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-05-30 16:00:58 -0400
commitaaaade4b3d66d67d2c08af3372c3965e7255b2e8 (patch)
tree76dfaefb014333b2f98c6db660454771655ea8b7 /Eigen/src/Core/products/SelfadjointRank2Update.h
parentfaa3ff3be6a02b57c6cb05edc87375e54ab96606 (diff)
the Index types change.
As discussed on the list (too long to explain here).
Diffstat (limited to 'Eigen/src/Core/products/SelfadjointRank2Update.h')
-rw-r--r--Eigen/src/Core/products/SelfadjointRank2Update.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/Eigen/src/Core/products/SelfadjointRank2Update.h b/Eigen/src/Core/products/SelfadjointRank2Update.h
index 9b52d5fe9..e20eb5c88 100644
--- a/Eigen/src/Core/products/SelfadjointRank2Update.h
+++ b/Eigen/src/Core/products/SelfadjointRank2Update.h
@@ -29,16 +29,16 @@
* It corresponds to the Level2 syr2 BLAS routine
*/
-template<typename Scalar, typename UType, typename VType, int UpLo>
+template<typename Scalar, typename Index, typename UType, typename VType, int UpLo>
struct ei_selfadjoint_rank2_update_selector;
-template<typename Scalar, typename UType, typename VType>
-struct ei_selfadjoint_rank2_update_selector<Scalar,UType,VType,Lower>
+template<typename Scalar, typename Index, typename UType, typename VType>
+struct ei_selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Lower>
{
- static void run(Scalar* mat, int stride, const UType& u, const VType& v, Scalar alpha)
+ static void run(Scalar* mat, Index stride, const UType& u, const VType& v, Scalar alpha)
{
- const int size = u.size();
- for (int i=0; i<size; ++i)
+ const Index size = u.size();
+ for (Index i=0; i<size; ++i)
{
Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i+i, size-i) +=
(alpha * ei_conj(u.coeff(i))) * v.tail(size-i)
@@ -47,13 +47,13 @@ struct ei_selfadjoint_rank2_update_selector<Scalar,UType,VType,Lower>
}
};
-template<typename Scalar, typename UType, typename VType>
-struct ei_selfadjoint_rank2_update_selector<Scalar,UType,VType,Upper>
+template<typename Scalar, typename Index, typename UType, typename VType>
+struct ei_selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Upper>
{
- static void run(Scalar* mat, int stride, const UType& u, const VType& v, Scalar alpha)
+ static void run(Scalar* mat, Index stride, const UType& u, const VType& v, Scalar alpha)
{
- const int size = u.size();
- for (int i=0; i<size; ++i)
+ const Index size = u.size();
+ for (Index i=0; i<size; ++i)
Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i, i+1) +=
(alpha * ei_conj(u.coeff(i))) * v.head(i+1)
+ (alpha * ei_conj(v.coeff(i))) * u.head(i+1);
@@ -84,7 +84,7 @@ SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo>
* VBlasTraits::extractScalarFactor(v.derived());
enum { IsRowMajor = (ei_traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0 };
- ei_selfadjoint_rank2_update_selector<Scalar,
+ ei_selfadjoint_rank2_update_selector<Scalar, Index,
typename ei_cleantype<typename ei_conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::ret>::type,
typename ei_cleantype<typename ei_conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::ret>::type,
(IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)>