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

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

#include <color_spinor_field_order.h>

Public Member Functions

__device__ __host__ colorspinor_wrapper (T &field, int x_cb, int parity)
 colorspinor_wrapper constructor More...
 
template<typename C >
__device__ __host__ void operator= (const C &a)
 Assignment operator with ColorSpinor instance as input. More...
 

Public Attributes

T & field
 
const int x_cb
 
const int parity
 

Detailed Description

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

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

Definition at line 40 of file color_spinor_field_order.h.

Constructor & Destructor Documentation

◆ colorspinor_wrapper()

template<typename Float , typename T >
__device__ __host__ quda::colorspinor_wrapper< Float, T >::colorspinor_wrapper ( T &  field,
int  x_cb,
int  parity 
)
inline

colorspinor_wrapper constructor

Parameters
[in]acolorspinor field accessor we are wrapping
[in]x_cbcheckerboarded space-time index we are accessing
[in]parityParity we are accessing

Definition at line 51 of file color_spinor_field_order.h.

Member Function Documentation

◆ operator=()

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

Assignment operator with ColorSpinor instance as input.

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

Definition at line 62 of file color_spinor_field_order.h.

Member Data Documentation

◆ field

template<typename Float , typename T >
T& quda::colorspinor_wrapper< Float, T >::field

Definition at line 41 of file color_spinor_field_order.h.

◆ parity

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

Definition at line 43 of file color_spinor_field_order.h.

◆ x_cb

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

Definition at line 42 of file color_spinor_field_order.h.


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