QUDA  v1.1.0
A library for QCD on GPUs
Public Member Functions | List of all members
quda::ShiftUpdate Class Reference
+ Inheritance diagram for quda::ShiftUpdate:

Public Member Functions

 ShiftUpdate (ColorSpinorField *r, std::vector< ColorSpinorField * > p, std::vector< ColorSpinorField * > x, double *alpha, double *beta, double *zeta, double *zeta_old, int j_low, int n_shift)
 
virtual ~ShiftUpdate ()
 
void updateNshift (int new_n_shift)
 
void updateNupdate (int new_n_update)
 
void apply (const qudaStream_t &stream)
 
- Public Member Functions inherited from quda::Worker
 Worker ()
 
virtual ~Worker ()
 

Detailed Description

This worker class is used to update the shifted p and x vectors. These updates take place in the subsequent dslash application in the next iteration, while we're waiting on communication to complete. This results in improved strong scaling of the multi-shift solver.

Since the matrix-vector consists of multiple dslash applications, we partition the shifts between these successive dslash applications for optimal communications hiding.

In general, when using a Worker class to hide communication in the dslash, one must be aware whether auto-tuning on the dslash policy that envelops the dslash will occur. If so, then the Worker class instance will be called multiple times during this tuning, potentially rendering the results wrong. This isn't a problem in the multi-shift solve, since we are guaranteed to not run the worker class on the first iteration (when the dslash policy tuning will take place), but this is something that will need to be addressed in the future as the Worker idea to applied elsewhere.

Definition at line 49 of file inv_multi_cg_quda.cpp.

Constructor & Destructor Documentation

◆ ShiftUpdate()

quda::ShiftUpdate::ShiftUpdate ( ColorSpinorField r,
std::vector< ColorSpinorField * >  p,
std::vector< ColorSpinorField * >  x,
double *  alpha,
double *  beta,
double *  zeta,
double *  zeta_old,
int  j_low,
int  n_shift 
)
inline

Definition at line 72 of file inv_multi_cg_quda.cpp.

◆ ~ShiftUpdate()

virtual quda::ShiftUpdate::~ShiftUpdate ( )
inlinevirtual

Definition at line 78 of file inv_multi_cg_quda.cpp.

Member Function Documentation

◆ apply()

void quda::ShiftUpdate::apply ( const qudaStream_t stream)
inlinevirtual

Implements quda::Worker.

Definition at line 85 of file inv_multi_cg_quda.cpp.

◆ updateNshift()

void quda::ShiftUpdate::updateNshift ( int  new_n_shift)
inline

Definition at line 80 of file inv_multi_cg_quda.cpp.

◆ updateNupdate()

void quda::ShiftUpdate::updateNupdate ( int  new_n_update)
inline

Definition at line 81 of file inv_multi_cg_quda.cpp.


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