10 #ifndef EIGEN_PACKED_TRIANGULAR_MATRIX_VECTOR_H 11 #define EIGEN_PACKED_TRIANGULAR_MATRIX_VECTOR_H 15 template<
typename Index,
int Mode,
typename LhsScalar,
bool ConjLhs,
typename RhsScalar,
bool ConjRhs,
int StorageOrder>
18 template<
typename Index,
int Mode,
typename LhsScalar,
bool ConjLhs,
typename RhsScalar,
bool ConjRhs>
21 typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType
ResScalar;
29 internal::conj_if<ConjRhs> cj;
30 typedef Map<const Matrix<LhsScalar,Dynamic,1> > LhsMap;
32 typedef Map<Matrix<ResScalar,Dynamic,1> > ResMap;
36 Index s = IsLower&&(HasUnitDiag||HasZeroDiag) ? 1 : 0;
37 Index r = IsLower ? size-
i:
i+1;
39 ResMap(res+(IsLower ? s+
i : 0),r) += alpha * cj(rhs[
i]) * ConjLhsType(LhsMap(lhs+s,r));
41 res[
i] += alpha * cj(rhs[i]);
42 lhs += IsLower ? size-i: i+1;
47 template<
typename Index,
int Mode,
typename LhsScalar,
bool ConjLhs,
typename RhsScalar,
bool ConjRhs>
50 typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType
ResScalar;
58 internal::conj_if<ConjRhs> cj;
59 typedef Map<const Matrix<LhsScalar,Dynamic,1> > LhsMap;
61 typedef Map<const Matrix<RhsScalar,Dynamic,1> > RhsMap;
66 Index s = !IsLower&&(HasUnitDiag||HasZeroDiag) ? 1 : 0;
67 Index r = IsLower ?
i+1 : size-
i;
69 res[i] += alpha * (ConjLhsType(LhsMap(lhs+s,r)).cwiseProduct(ConjRhsType(RhsMap(rhs+(IsLower ? 0 : s+i),r)))).
sum();
71 res[
i] += alpha * cj(rhs[i]);
72 lhs += IsLower ? i+1 : size-
i;
79 #endif // EIGEN_PACKED_TRIANGULAR_MATRIX_VECTOR_H
#define EIGEN_IMPLIES(a, b)
ScalarBinaryOpTraits< LhsScalar, RhsScalar >::ReturnType ResScalar
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const mpreal sum(const mpreal tab[], const unsigned long int n, int &status, mp_rnd_t mode=mpreal::get_default_rnd())
static void run(Index size, const LhsScalar *lhs, const RhsScalar *rhs, ResScalar *res, ResScalar alpha)
static void run(Index size, const LhsScalar *lhs, const RhsScalar *rhs, ResScalar *res, ResScalar alpha)
ScalarBinaryOpTraits< LhsScalar, RhsScalar >::ReturnType ResScalar