CHROMA
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Chroma::LLVMCloverTermT< T, U > Class Template Reference

#include <clover_term_llvm_w.h>

Inheritance diagram for Chroma::LLVMCloverTermT< T, U >:
Chroma::CloverTermBase< T, U > Chroma::DslashLinearOperator< T, multi1d< U >, multi1d< U > > Chroma::DiffLinearOperator< T, P, Q > Chroma::LinearOperator< T >

Public Types

typedef WordType< T >::Type_t REALT
 
typedef OLattice< PScalar< PScalar< RScalar< Word< REALT > > > > > LatticeREAL
 
typedef OScalar< PScalar< PScalar< RScalar< Word< REALT > > > > > RealT
 
using DiagType = OLattice< PComp< PTriDia< RScalar< Word< REALT > > > > >
 
using OffDiagType = OLattice< PComp< PTriOff< RComplex< Word< REALT > > > > >
 

Public Member Functions

 LLVMCloverTermT ()
 Empty constructor. Must use create later. More...
 
 ~LLVMCloverTermT ()
 No real need for cleanup here. More...
 
void create (Handle< FermState< T, multi1d< U >, multi1d< U > > > fs, const CloverFermActParams &param_)
 Creation routine. More...
 
virtual void create (Handle< FermState< T, multi1d< U >, multi1d< U > > > fs, const CloverFermActParams &param_, const LLVMCloverTermT< T, U > &from_)
 
void choles (int cb)
 Computes the inverse of the term on cb using Cholesky. More...
 
Double cholesDet (int cb) const
 Computes the inverse of the term on cb using Cholesky. More...
 
void apply (T &chi, const T &psi, enum PlusMinus isign, int cb) const
 
void applySite (T &chi, const T &psi, enum PlusMinus isign, int site) const
 
void triacntr (U &B, int mat, int cb) const
 Calculates Tr_D ( Gamma_mat L ) More...
 
const FermBC< T, multi1d< U >, multi1d< U > > & getFermBC () const
 Return the fermion BC object for this linear operator. More...
 
void packForQUDA (multi1d< QUDAPackedClovSite< REALT > > &quda_pack, int cb) const
 PACK UP the Clover term for QUDA library: More...
 
int getDiaId () const
 
int getOffId () const
 
const DiagTypegetDiagBuffer () const
 
const OffDiagTypegetOffDiagBuffer () const
 
- Public Member Functions inherited from Chroma::CloverTermBase< T, U >
virtual ~CloverTermBase ()
 No real need for cleanup here. More...
 
const Subset & subset () const
 Subset is all here. More...
 
void deriv (multi1d< U > &ds_u, const T &chi, const T &psi, enum PlusMinus isign) const
 Take deriv of D. More...
 
void deriv (multi1d< U > &ds_u, const T &chi, const T &psi, enum PlusMinus isign, int cb) const
 Take deriv of D. More...
 
void derivMultipole (multi1d< U > &ds_u, const multi1d< T > &chi, const multi1d< T > &psi, enum PlusMinus isign) const
 Take deriv of D. More...
 
void derivMultipole (multi1d< U > &ds_u, const multi1d< T > &chi, const multi1d< T > &psi, enum PlusMinus isign, int cb) const
 Take deriv of D. More...
 
void derivTrLn (multi1d< U > &ds_u, enum PlusMinus isign, int cb) const
 Take derivative of TrLn D. More...
 
void deriv_loops (const int u, const int mu, const int cb, U &ds_u_mu, U &ds_u_nu, const U &Lambda) const
 
unsigned long nFlops () const
 Return flops performed by the operator() More...
 
- Public Member Functions inherited from Chroma::DslashLinearOperator< T, multi1d< U >, multi1d< U > >
virtual ~DslashLinearOperator ()
 Virtual destructor to help in cleanup. More...
 
virtual void operator() (T &d, const T &psi, enum PlusMinus isign) const
 Apply operator on both checkerboards (entire lattice) More...
 
- Public Member Functions inherited from Chroma::DiffLinearOperator< T, P, Q >
virtual ~DiffLinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
virtual void deriv (P &ds_u, const T &chi, const T &psi, enum PlusMinus isign) const
 Apply the derivative of the operator onto a source std::vector. More...
 
virtual void deriv (P &ds_u, const T &chi, const T &psi, enum PlusMinus isign, const Real &epsilon) const
 Apply the derivative of the operator onto a source std::vector to some precision. More...
 
virtual void derivMultipole (P &ds_u, const multi1d< T > &chi, const multi1d< T > &psi, enum PlusMinus isign) const
 Return the force for multiple poles. More...
 
- Public Member Functions inherited from Chroma::LinearOperator< T >
virtual ~LinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
virtual void operator() (T &chi, const T &psi, enum PlusMinus isign, Real epsilon) const
 Apply the operator onto a source std::vector to some precision. More...
 

Protected Member Functions

void makeClov (const multi1d< U > &f, const RealT &diag_mass)
 Create the clover term on cb. More...
 
void ldagdlinv (LatticeREAL &tr_log_diag, int cb)
 Invert the clover term on cb. More...
 
const multi1d< U > & getU () const
 Get the u field. More...
 
Real getCloverCoeff (int mu, int nu) const
 Calculates Tr_D ( Gamma_mat L ) More...
 

Private Attributes

Handle< FermBC< T, multi1d< U >, multi1d< U > > > fbc
 
multi1d< Uu
 
CloverFermActParams param
 
LatticeREAL tr_log_diag_
 
multi1d< bool > choles_done
 
OLattice< PComp< PTriDia< RScalar< Word< REALT > > > > > tri_dia
 
OLattice< PComp< PTriOff< RComplex< Word< REALT > > > > > tri_off
 

Detailed Description

template<typename T, typename U>
class Chroma::LLVMCloverTermT< T, U >

Definition at line 297 of file clover_term_llvm_w.h.

Member Typedef Documentation

◆ DiagType

template<typename T , typename U >
using Chroma::LLVMCloverTermT< T, U >::DiagType = OLattice<PComp<PTriDia<RScalar <Word<REALT> > > > >

Definition at line 367 of file clover_term_llvm_w.h.

◆ LatticeREAL

template<typename T , typename U >
typedef OLattice< PScalar< PScalar< RScalar< Word< REALT> > > > > Chroma::LLVMCloverTermT< T, U >::LatticeREAL

Definition at line 303 of file clover_term_llvm_w.h.

◆ OffDiagType

template<typename T , typename U >
using Chroma::LLVMCloverTermT< T, U >::OffDiagType = OLattice<PComp<PTriOff<RComplex<Word<REALT> > > > >

Definition at line 368 of file clover_term_llvm_w.h.

◆ REALT

template<typename T , typename U >
typedef WordType<T>::Type_t Chroma::LLVMCloverTermT< T, U >::REALT

Definition at line 301 of file clover_term_llvm_w.h.

◆ RealT

template<typename T , typename U >
typedef OScalar< PScalar< PScalar< RScalar< Word< REALT> > > > > Chroma::LLVMCloverTermT< T, U >::RealT

Definition at line 304 of file clover_term_llvm_w.h.

Constructor & Destructor Documentation

◆ LLVMCloverTermT()

template<typename T , typename U >
Chroma::LLVMCloverTermT< T, U >::LLVMCloverTermT

Empty constructor. Must use create later.

Definition at line 409 of file clover_term_llvm_w.h.

◆ ~LLVMCloverTermT()

template<typename T , typename U >
Chroma::LLVMCloverTermT< T, U >::~LLVMCloverTermT ( )
inline

No real need for cleanup here.

Definition at line 310 of file clover_term_llvm_w.h.

Member Function Documentation

◆ apply()

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::apply ( T chi,
const T psi,
enum PlusMinus  isign,
int  cb 
) const
virtual

Apply a dslash

Performs the operation

chi <- (L + D + L^dag) . psi

where L is a lower triangular matrix D is the real diagonal. (stored together in type TRIANG)

Arguments:

Parameters
chiresult (Write)
psisource (Read)
isignD'^dag or D' ( MINUS | PLUS ) resp. (Read)
cbCheckerboard of OUTPUT std::vector (Read)

Implements Chroma::DslashLinearOperator< T, multi1d< U >, multi1d< U > >.

Definition at line 1702 of file clover_term_llvm_w.h.

References Chroma::cb, Chroma::chi(), Chroma::END_CODE(), Chroma::function_apply_clov_build(), Chroma::function_apply_clov_exec(), Chroma::psi, and Chroma::START_CODE().

◆ applySite()

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::applySite ( T chi,
const T psi,
enum PlusMinus  isign,
int  site 
) const
virtual

Implements Chroma::CloverTermBase< T, U >.

Definition at line 1816 of file clover_term_llvm_w.h.

References Chroma::QDP_error_exit().

◆ choles()

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::choles ( int  cb)
virtual

Computes the inverse of the term on cb using Cholesky.

Invert.

Parameters
cbcheckerboard of work (Read)

Computes the inverse of the term on cb using Cholesky

Implements Chroma::CloverTermBase< T, U >.

Definition at line 819 of file clover_term_llvm_w.h.

References Chroma::cb, Chroma::END_CODE(), and Chroma::START_CODE().

◆ cholesDet()

template<typename T , typename U >
Double Chroma::LLVMCloverTermT< T, U >::cholesDet ( int  cb) const
virtual

Computes the inverse of the term on cb using Cholesky.

Invert.

Parameters
cbcheckerboard of work (Read)
Returns
logarithm of the determinant

Computes the inverse of the term on cb using Cholesky

Returns
logarithm of the determinant

Implements Chroma::CloverTermBase< T, U >.

Definition at line 839 of file clover_term_llvm_w.h.

References Chroma::cb, Chroma::END_CODE(), Chroma::START_CODE(), and sum.

◆ create() [1/2]

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::create ( Handle< FermState< T, multi1d< U >, multi1d< U > > >  fs,
const CloverFermActParams param_ 
)

Creation routine.

Definition at line 472 of file clover_term_llvm_w.h.

References Chroma::END_CODE(), Chroma::i, Chroma::mesField(), Nd, Chroma::START_CODE(), and Chroma::u.

◆ create() [2/2]

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::create ( Handle< FermState< T, multi1d< U >, multi1d< U > > >  fs,
const CloverFermActParams param_,
const LLVMCloverTermT< T, U > &  from_ 
)
virtual

◆ getCloverCoeff()

template<typename T , typename U >
Real Chroma::LLVMCloverTermT< T, U >::getCloverCoeff ( int  mu,
int  nu 
) const
protectedvirtual

Calculates Tr_D ( Gamma_mat L )

Returns the appropriate clover coefficient for indices mu and nu.

Implements Chroma::CloverTermBase< T, U >.

Definition at line 1550 of file clover_term_llvm_w.h.

References Chroma::END_CODE(), mu, nu, and Chroma::START_CODE().

◆ getDiagBuffer()

template<typename T , typename U >
const DiagType& Chroma::LLVMCloverTermT< T, U >::getDiagBuffer ( ) const
inline

Definition at line 370 of file clover_term_llvm_w.h.

References Chroma::LLVMCloverTermT< T, U >::tri_dia.

◆ getDiaId()

template<typename T , typename U >
int Chroma::LLVMCloverTermT< T, U >::getDiaId ( ) const
inline

Definition at line 364 of file clover_term_llvm_w.h.

References Chroma::LLVMCloverTermT< T, U >::tri_dia.

◆ getFermBC()

template<typename T , typename U >
const FermBC<T, multi1d<U>, multi1d<U> >& Chroma::LLVMCloverTermT< T, U >::getFermBC ( ) const
inlinevirtual

Return the fermion BC object for this linear operator.

Implements Chroma::DslashLinearOperator< T, multi1d< U >, multi1d< U > >.

Definition at line 359 of file clover_term_llvm_w.h.

References Chroma::LLVMCloverTermT< T, U >::fbc.

◆ getOffDiagBuffer()

template<typename T , typename U >
const OffDiagType& Chroma::LLVMCloverTermT< T, U >::getOffDiagBuffer ( ) const
inline

Definition at line 371 of file clover_term_llvm_w.h.

References Chroma::LLVMCloverTermT< T, U >::tri_off.

◆ getOffId()

template<typename T , typename U >
int Chroma::LLVMCloverTermT< T, U >::getOffId ( ) const
inline

Definition at line 365 of file clover_term_llvm_w.h.

References Chroma::LLVMCloverTermT< T, U >::tri_off.

◆ getU()

template<typename T , typename U >
const multi1d<U>& Chroma::LLVMCloverTermT< T, U >::getU ( ) const
inlineprotectedvirtual

Get the u field.

Implements Chroma::CloverTermBase< T, U >.

Definition at line 386 of file clover_term_llvm_w.h.

References Chroma::LLVMCloverTermT< T, U >::u.

◆ ldagdlinv()

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::ldagdlinv ( LatticeREAL tr_log_diag,
int  cb 
)
protected

Invert the clover term on cb.

An LDL^\dag decomposition and inversion?

Definition at line 1076 of file clover_term_llvm_w.h.

References Chroma::cb, Chroma::END_CODE(), Chroma::function_ldagdlinv_exec(), Chroma::START_CODE(), and Chroma::zero.

◆ makeClov()

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::makeClov ( const multi1d< U > &  f,
const RealT diag_mass 
)
protected

Create the clover term on cb.

Parameters
ffield strength tensor F(mu,nu) (Read)
cbcheckerboard (Read)

Definition at line 777 of file clover_term_llvm_w.h.

References Chroma::END_CODE(), std::tr1::f1, std::tr1::f2, std::tr1::f3, std::tr1::f4, std::tr1::f5, Chroma::function_make_clov_build(), Chroma::function_make_clov_exec(), Nd, and Chroma::START_CODE().

◆ packForQUDA()

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::packForQUDA ( multi1d< QUDAPackedClovSite< REALT > > &  quda_pack,
int  cb 
) const

PACK UP the Clover term for QUDA library:

Definition at line 1795 of file clover_term_llvm_w.h.

References Chroma::cb, QDP::PackForQUDATimer::get(), and QDP::PackForQUDATimer::Instance().

◆ triacntr()

template<typename T , typename U >
void Chroma::LLVMCloverTermT< T, U >::triacntr ( U B,
int  mat,
int  cb 
) const
virtual

Calculates Tr_D ( Gamma_mat L )

Implements Chroma::CloverTermBase< T, U >.

Definition at line 1520 of file clover_term_llvm_w.h.

References Chroma::cb, Chroma::END_CODE(), Chroma::function_triacntr_exec(), Chroma::START_CODE(), and Chroma::zero.

Member Data Documentation

◆ choles_done

template<typename T , typename U >
multi1d<bool> Chroma::LLVMCloverTermT< T, U >::choles_done
private

Definition at line 398 of file clover_term_llvm_w.h.

Referenced by Chroma::LLVMCloverTermT< T, U >::create().

◆ fbc

template<typename T , typename U >
Handle< FermBC<T,multi1d<U>,multi1d<U> > > Chroma::LLVMCloverTermT< T, U >::fbc
private

Definition at line 393 of file clover_term_llvm_w.h.

Referenced by Chroma::LLVMCloverTermT< T, U >::getFermBC().

◆ param

template<typename T , typename U >
CloverFermActParams Chroma::LLVMCloverTermT< T, U >::param
private

Definition at line 395 of file clover_term_llvm_w.h.

◆ tr_log_diag_

template<typename T , typename U >
LatticeREAL Chroma::LLVMCloverTermT< T, U >::tr_log_diag_
private

Definition at line 396 of file clover_term_llvm_w.h.

Referenced by Chroma::LLVMCloverTermT< T, U >::create().

◆ tri_dia

template<typename T , typename U >
OLattice<PComp<PTriDia<RScalar <Word<REALT> > > > > Chroma::LLVMCloverTermT< T, U >::tri_dia
private

◆ tri_off

template<typename T , typename U >
OLattice<PComp<PTriOff<RComplex<Word<REALT> > > > > Chroma::LLVMCloverTermT< T, U >::tri_off
private

◆ u

template<typename T , typename U >
multi1d<U> Chroma::LLVMCloverTermT< T, U >::u
private

Definition at line 394 of file clover_term_llvm_w.h.

Referenced by Chroma::LLVMCloverTermT< T, U >::getU().


The documentation for this class was generated from the following file: