6 #ifndef MYRAMATH_MULTIFRONTAL_ZLDLH_FACTOR_H 7 #define MYRAMATH_MULTIFRONTAL_ZLDLH_FACTOR_H 14 #include <myramath/multifrontal/detail/llt/factor.h> 20 #include <myramath/dense/detail/nwork.h> 29 namespace multifrontal {
33 template<
class Precision>
class JobGraphBase :
public ::myra::multifrontal::detail::llt::factor::JobGraphBase2<ZLDLHKernel<Precision> >
38 typedef std::complex<Precision> Number;
40 typedef ::myra::multifrontal::detail::llt::factor::JobGraphBase2<Kernel> Base;
43 typedef ::myra::multifrontal::detail::llt::LContainer<Kernel> LContainer;
49 : Base(in_lcontainer), lcontainer(in_lcontainer) { }
52 virtual ::myra::JobGraphBase* clone()
const 58 virtual uint64_t factor(
int n,
int k)
61 if (k == 0) this->assign_contributions(n,k);
62 return lcontainer->factor(n,k);
66 virtual uint64_t trsm(
int n,
int k,
int i)
69 if (k == 0) this->assign_contributions(n,i,k);
71 const Kernel& Ln_kk = this->l(n,k);
72 uint64_t w = Ln_kk.
solveL(An_ik,
'R',
'H');
78 virtual uint64_t rankk(
int n,
int k,
int ij)
87 Precision beta = k ? one : zero;
89 std::pair<int,int> inertia = this->l(n,k).inertia();
91 w += herk_nwork(An_ij, Ln_ijk. left(inertia.first) ,
'N', -one, beta);
92 w += herk_nwork(An_ij, Ln_ijk.
right(inertia.second),
'N', one, one );
94 if (k == 0) this->add_contributions(n,ij);
99 virtual uint64_t gemm(
int n,
int k,
int i,
int j)
109 Number beta = k ? one : zero;
111 std::pair<int,int> inertia = this->l(n,k).inertia();
113 w += gemm_nwork(An_ij, Ln_ik. left(inertia.first ),
'N', Ln_jk. left(inertia.first ),
'H', -one, beta);
114 w += gemm_nwork(An_ij, Ln_ik.
right(inertia.second),
'N', Ln_jk.
right(inertia.second),
'H', one, one );
116 if (k == 0) this->add_contributions(n,i,j);
123 LContainer* lcontainer;
Interface class for representing subranges of dense Matrix's.
Represents a mutable LowerMatrixRange.
Definition: conjugate.h:28
Tabulates an IxJ matrix. Allows random access, has column major layout to be compatible with BLAS/LAP...
Definition: bdsqr.h:20
LDL' decompositions for real hermitian Matrix A (indefinite is fine).
Factors A into L*L', presents solve methods.
Definition: Kernel.h:39
Range construct for a lower triangular matrix stored in rectangular packed format.
Represents a const MatrixRange.
Definition: bothcat.h:22
Routines for backsolving by a triangular Matrix or LowerMatrix.
Specialized container for a lower triangular matrix, O(N^2/2) storage. Used by symmetry exploiting ma...
CMatrixRange< Number > right(int j) const
Returns the j rightmost columns, this(:,J-j:J)
Definition: MatrixRange.cpp:596
Represents a mutable MatrixRange.
Definition: conjugate.h:26
General purpose dense matrix container, O(i*j) storage.
Stores a lower triangular matrix in rectangular packed format.
Definition: conjugate.h:22
void solveI(const MatrixRange< Number > &B, char side) const
Solves I*X=B or X*I=B, overwrites B with X.
Definition: Kernel.h:170
Routines for symmetric rank-k updates, a specialized form of Matrix*Matrix multiplication.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
uint64_t solveL(const MatrixRange< Number > &B, char side, char op) const
Solves op(L)*X=B or X*op(L)=B, overwrites B with X.
Definition: Kernel.h:78