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

#include <transfer.h>

Public Member Functions

 Transfer (const std::vector< ColorSpinorField * > &B, int Nvec, int NblockOrtho, int *geo_bs, int spin_bs, QudaPrecision null_precision, const QudaTransferType transfer_type, TimeProfile &profile)
 
virtual ~Transfer ()
 
void reset ()
 for resetting the Transfer when the null vectors have changed More...
 
void P (ColorSpinorField &out, const ColorSpinorField &in) const
 
void R (ColorSpinorField &out, const ColorSpinorField &in) const
 
QudaPrecision NullPrecision (QudaFieldLocation location) const
 The precision of the packed null-space vectors. More...
 
const ColorSpinorFieldVectors (QudaFieldLocation location=QUDA_INVALID_FIELD_LOCATION) const
 
int nvec () const
 
int Spin_bs () const
 
const int * Geo_bs () const
 
QudaTransferType getTransferType () const
 
const int * fineToCoarse (QudaFieldLocation location=QUDA_CPU_FIELD_LOCATION) const
 
const int * coarseToFine (QudaFieldLocation location=QUDA_CPU_FIELD_LOCATION) const
 
void setTransferGPU (bool use_gpu) const
 
void setSiteSubset (QudaSiteSubset site_subset, QudaParity parity)
 Sets whether the transfer operator is to act on full fields or single parity fields, and if single-parity which parity. More...
 
double flops () const
 

Detailed Description

The transfer class defines the inter-grid operators that connect fine and coarse grids. This implements both restriction and prologation methods. The transfer operator is fully defined at object creation time, and defined by the null-space vectors and the coarsening pattern that are passed to it.

At present only the restriction (R) and prolongation (P) methods have been offloaded to run on the GPU, with the block orthogonlization yet to be offloaded.

Definition at line 29 of file transfer.h.

Constructor & Destructor Documentation

◆ Transfer()

quda::Transfer::Transfer ( const std::vector< ColorSpinorField * > &  B,
int  Nvec,
int  NblockOrtho,
int *  geo_bs,
int  spin_bs,
QudaPrecision  null_precision,
const QudaTransferType  transfer_type,
TimeProfile profile 
)

The constructor for Transfer

Parameters
BArray of null-space vectors
NvecNumber of null-space vectors
NblockOrthoNumber of times to Gram-Schmidt within block ortho
dThe Dirac operator to which these null-space vectors correspond
geo_bsThe geometric block sizes to use
spin_bsThe spin block sizes to use
parityFor single-parity fields are these QUDA_EVEN_PARITY or QUDA_ODD_PARITY
null_precisionThe precision to store the null-space basis vectors in
enable_gpuWhether to enable this to run on GPU (as well as CPU)

Definition at line 21 of file transfer.cpp.

◆ ~Transfer()

quda::Transfer::~Transfer ( )
virtual

The destructor for Transfer

Definition at line 251 of file transfer.cpp.

Member Function Documentation

◆ coarseToFine()

const int* quda::Transfer::coarseToFine ( QudaFieldLocation  location = QUDA_CPU_FIELD_LOCATION) const
inline
Returns
Pointer to the lookup table to the coarse-to-fine map

Definition at line 251 of file transfer.h.

◆ fineToCoarse()

const int* quda::Transfer::fineToCoarse ( QudaFieldLocation  location = QUDA_CPU_FIELD_LOCATION) const
inline
Returns
Pointer to the lookup table to the fine-to-coarse map

Definition at line 245 of file transfer.h.

◆ flops()

double quda::Transfer::flops ( ) const

Return flops

Returns
flops expended by this operator

Definition at line 478 of file transfer.cpp.

◆ Geo_bs()

const int* quda::Transfer::Geo_bs ( ) const
inline

Returns the geometrical coarse grid blocking

Returns
geo_bs

Definition at line 234 of file transfer.h.

◆ getTransferType()

QudaTransferType quda::Transfer::getTransferType ( ) const
inline

Returns the transfer type; used to inform staggered-type coarsenings

Returns
transfer_type

Definition at line 240 of file transfer.h.

◆ NullPrecision()

QudaPrecision quda::Transfer::NullPrecision ( QudaFieldLocation  location) const
inline

The precision of the packed null-space vectors.

Definition at line 199 of file transfer.h.

◆ nvec()

int quda::Transfer::nvec ( ) const
inline

Returns the number of near nullvectors

Returns
Nvec

Definition at line 222 of file transfer.h.

◆ P()

void quda::Transfer::P ( ColorSpinorField out,
const ColorSpinorField in 
) const

Apply the prolongator

Parameters
outThe resulting field on the fine lattice
inThe input field on the coarse lattice

Definition at line 350 of file transfer.cpp.

◆ R()

void quda::Transfer::R ( ColorSpinorField out,
const ColorSpinorField in 
) const

Apply the restrictor

Parameters
outThe resulting field on the coarse lattice
inThe input field on the fine lattice

Definition at line 412 of file transfer.cpp.

◆ reset()

void quda::Transfer::reset ( )

for resetting the Transfer when the null vectors have changed

Definition at line 226 of file transfer.cpp.

◆ setSiteSubset()

void quda::Transfer::setSiteSubset ( QudaSiteSubset  site_subset,
QudaParity  parity 
)

Sets whether the transfer operator is to act on full fields or single parity fields, and if single-parity which parity.

Parameters
[in]site_subsetThe site_subset of the fine-grid fields
[in]parityThe parity of the single-parity fields (if applicable)

Definition at line 273 of file transfer.cpp.

◆ setTransferGPU()

void quda::Transfer::setTransferGPU ( bool  use_gpu) const
inline

Sets where the prolongator / restrictor should take place

Parameters
locationLocation where the transfer operator should be computed

Definition at line 258 of file transfer.h.

◆ Spin_bs()

int quda::Transfer::Spin_bs ( ) const
inline

Returns the amount of spin blocking. Defined as zero when coarsening staggered.

Returns
spin_bs

Definition at line 228 of file transfer.h.

◆ Vectors()

const ColorSpinorField& quda::Transfer::Vectors ( QudaFieldLocation  location = QUDA_INVALID_FIELD_LOCATION) const
inline

Returns a const reference to the V field

Parameters
locationWhich memory space are we requesting
Returns
The V field const reference

Definition at line 209 of file transfer.h.


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