From 2828c995c55891b0769b6a4cf3a9e99fe53b01d3 Mon Sep 17 00:00:00 2001 From: Chen-Pang He Date: Sun, 9 Sep 2012 21:35:28 +0800 Subject: Use conj_expr_if to clarify what it's doing. --- blas/GeneralRank1Update.h | 5 +++-- blas/PackedSelfadjointProduct.h | 10 +++++----- blas/level2_real_impl.h | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'blas') 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 { static void run(Index rows, Index cols, Scalar* mat, Index stride, const Scalar* u, const Scalar* v, Scalar alpha) { - internal::conj_if cj; typedef Map > OtherMap; - typedef typename internal::conditional::type ConjRhsType; + typedef typename conj_expr_if::type ConjRhsType; + conj_if cj; + for (Index i=0; i >(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 struct selfadjoint_packed_rank1_update; @@ -29,9 +29,9 @@ struct selfadjoint_packed_rank1_update cj; typedef Map > OtherMap; - typedef typename internal::conditional::type ConjRhsType; + typedef typename conj_expr_if::type ConjRhsType; + conj_if cj; Index offset = 0; for (Index i=0; i::run); - func[LO] = (internal::selfadjoint_packed_rank1_update::run); + func[UP] = (internal::selfadjoint_packed_rank1_update::run); + func[LO] = (internal::selfadjoint_packed_rank1_update::run); init = true; } -- cgit v1.2.3