aboutsummaryrefslogtreecommitdiffhomepage
path: root/blas
diff options
context:
space:
mode:
authorGravatar Chen-Pang He <jdh8@ms63.hinet.net>2012-09-09 21:35:28 +0800
committerGravatar Chen-Pang He <jdh8@ms63.hinet.net>2012-09-09 21:35:28 +0800
commit2828c995c55891b0769b6a4cf3a9e99fe53b01d3 (patch)
treed89fe694bb5d272485bde1dad4bd6fb8dc461e25 /blas
parent669db3d7768b3b94d31d6552a1012ee29f54b8d8 (diff)
Use conj_expr_if to clarify what it's doing.
Diffstat (limited to 'blas')
-rw-r--r--blas/GeneralRank1Update.h5
-rw-r--r--blas/PackedSelfadjointProduct.h10
-rw-r--r--blas/level2_real_impl.h4
3 files changed, 10 insertions, 9 deletions
diff --git a/blas/GeneralRank1Update.h b/blas/GeneralRank1Update.h
index 6d33fbcc1..07d388c88 100644
--- a/blas/GeneralRank1Update.h
+++ b/blas/GeneralRank1Update.h
@@ -21,9 +21,10 @@ struct general_rank1_update<Scalar,Index,ColMajor,ConjLhs,ConjRhs>
{
static void run(Index rows, Index cols, Scalar* mat, Index stride, const Scalar* u, const Scalar* v, Scalar alpha)
{
- internal::conj_if<ConjRhs> cj;
typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;
- typedef typename internal::conditional<ConjLhs,typename OtherMap::ConjugateReturnType,const OtherMap&>::type ConjRhsType;
+ typedef typename conj_expr_if<ConjLhs,OtherMap>::type ConjRhsType;
+ conj_if<ConjRhs> cj;
+
for (Index i=0; i<cols; ++i)
Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i,rows) += alpha * cj(v[i]) * ConjRhsType(OtherMap(u,rows));
}
diff --git a/blas/PackedSelfadjointProduct.h b/blas/PackedSelfadjointProduct.h
index adc86ece1..1ba67b9c1 100644
--- a/blas/PackedSelfadjointProduct.h
+++ b/blas/PackedSelfadjointProduct.h
@@ -17,9 +17,9 @@ namespace internal {
*
* FIXME I always fail tests for complex self-adjoint matrices.
*
- ******* FATAL ERROR - PARAMETER NUMBER 6 WAS CHANGED INCORRECTLY *******
- ******* xHPR FAILED ON CALL NUMBER:
- 2: xHPR ('U', 1, 0.0, X, 1, AP)
+ * ******* FATAL ERROR - PARAMETER NUMBER 6 WAS CHANGED INCORRECTLY *******
+ * ******* xHPR FAILED ON CALL NUMBER:
+ * 2: xHPR ('U', 1, 0.0, X, 1, AP)
*/
template<typename Scalar, typename Index, int StorageOrder, int UpLo, bool ConjLhs, bool ConjRhs>
struct selfadjoint_packed_rank1_update;
@@ -29,9 +29,9 @@ struct selfadjoint_packed_rank1_update<Scalar,Index,ColMajor,UpLo,ConjLhs,ConjRh
{
static void run(Index size, Scalar* mat, const Scalar* vec, Scalar alpha)
{
- internal::conj_if<ConjRhs> cj;
typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;
- typedef typename internal::conditional<ConjLhs,typename OtherMap::ConjugateReturnType,const OtherMap&>::type ConjRhsType;
+ typedef typename conj_expr_if<ConjLhs,OtherMap>::type ConjRhsType;
+ conj_if<ConjRhs> cj;
Index offset = 0;
for (Index i=0; i<size; ++i)
diff --git a/blas/level2_real_impl.h b/blas/level2_real_impl.h
index 38b0dadb6..febf08d1f 100644
--- a/blas/level2_real_impl.h
+++ b/blas/level2_real_impl.h
@@ -242,8 +242,8 @@ int EIGEN_BLAS_FUNC(spr)(char *uplo, int *n, Scalar *palpha, Scalar *px, int *in
for(int k=0; k<2; ++k)
func[k] = 0;
- func[UP] = (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Upper,false,Conj>::run);
- func[LO] = (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Lower,false,Conj>::run);
+ func[UP] = (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Upper,false,false>::run);
+ func[LO] = (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Lower,false,false>::run);
init = true;
}