QUDA  v1.1.0
A library for QCD on GPUs
Public Member Functions | Public Attributes | List of all members
quda::gauge_wrapper< Float, T > Struct Template Reference

gauge_wrapper is an internal class that is used to wrap instances of gauge accessors, currying in a specific location on the field. The operator() accessors in gauge-field accessors return instances to this class, allowing us to then use operator overloading upon this class to interact with the Matrix class. As a result we can include gauge-field accessors directly in Matrix expressions in kernels without having to declare temporaries with explicit calls to the load/save methods in the gauge-field accessors. More...

#include <gauge_field_order.h>

Public Member Functions

__device__ __host__ gauge_wrapper (T &gauge, int dim, int x_cb, int parity, Float phase=1.0)
 gauge_wrapper constructor More...
 
template<typename M >
__device__ __host__ void operator= (const M &a)
 Assignment operator with Matrix instance as input. More...
 

Public Attributes

const int dim
 
const int x_cb
 
const int parity
 
const Float phase
 
T & gauge
 

Detailed Description

template<typename Float, typename T>
struct quda::gauge_wrapper< Float, T >

gauge_wrapper is an internal class that is used to wrap instances of gauge accessors, currying in a specific location on the field. The operator() accessors in gauge-field accessors return instances to this class, allowing us to then use operator overloading upon this class to interact with the Matrix class. As a result we can include gauge-field accessors directly in Matrix expressions in kernels without having to declare temporaries with explicit calls to the load/save methods in the gauge-field accessors.

Definition at line 44 of file gauge_field_order.h.

Constructor & Destructor Documentation

◆ gauge_wrapper()

template<typename Float , typename T >
__device__ __host__ quda::gauge_wrapper< Float, T >::gauge_wrapper ( T &  gauge,
int  dim,
int  x_cb,
int  parity,
Float  phase = 1.0 
)
inline

gauge_wrapper constructor

Parameters
[in]gaugeGauge field accessor we are wrapping
[in]dimDimension we are accessing
[in]x_cbCheckerboarded space-time index we are accessing
[in]parityParity we are accessing

Definition at line 58 of file gauge_field_order.h.

Member Function Documentation

◆ operator=()

template<typename Float , typename T >
template<typename M >
__device__ __host__ void quda::gauge_wrapper< Float, T >::operator= ( const M &  a)
inline

Assignment operator with Matrix instance as input.

Parameters
[in]MMatrix we want to store in this accessor

Definition at line 72 of file gauge_field_order.h.

Member Data Documentation

◆ dim

template<typename Float , typename T >
const int quda::gauge_wrapper< Float, T >::dim

Definition at line 45 of file gauge_field_order.h.

◆ gauge

template<typename Float , typename T >
T& quda::gauge_wrapper< Float, T >::gauge

Definition at line 49 of file gauge_field_order.h.

◆ parity

template<typename Float , typename T >
const int quda::gauge_wrapper< Float, T >::parity

Definition at line 47 of file gauge_field_order.h.

◆ phase

template<typename Float , typename T >
const Float quda::gauge_wrapper< Float, T >::phase

Definition at line 48 of file gauge_field_order.h.

◆ x_cb

template<typename Float , typename T >
const int quda::gauge_wrapper< Float, T >::x_cb

Definition at line 46 of file gauge_field_order.h.


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