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

#include <color_spinor.h>

Public Member Functions

__device__ __host__ ColorSpinor ()
 
__device__ __host__ ColorSpinor (const ColorSpinor< Float, Nc, Ns > &a)
 
__device__ __host__ ColorSpinor< Float, Nc, Ns > & operator= (const ColorSpinor< Float, Nc, Ns > &a)
 
__device__ __host__ ColorSpinor< Float, Nc, Ns > operator- () const
 
__device__ __host__ ColorSpinor< Float, Nc, Ns > & operator+= (const ColorSpinor< Float, Nc, Ns > &a)
 
template<typename T >
__device__ __host__ ColorSpinor< Float, Nc, Ns > & operator*= (const T &a)
 
__device__ __host__ ColorSpinor< Float, Nc, Ns > & operator-= (const ColorSpinor< Float, Nc, Ns > &a)
 
template<typename S >
__device__ __host__ ColorSpinor (const colorspinor_wrapper< Float, S > &s)
 
template<typename S >
__device__ __host__ void operator= (const colorspinor_wrapper< Float, S > &s)
 
template<typename S >
__device__ __host__ ColorSpinor (const colorspinor_ghost_wrapper< Float, S > &s)
 
template<typename S >
__device__ __host__ void operator= (const colorspinor_ghost_wrapper< Float, S > &s)
 
__device__ __host__ complex< Float > & operator() (int s, int c)
 2-d accessor functor More...
 
__device__ __host__ const complex< Float > & operator() (int s, int c) const
 2-d accessor functor More...
 
__device__ __host__ complex< Float > & operator() (int idx)
 1-d accessor functor More...
 
__device__ __host__ const complex< Float > & operator() (int idx) const
 1-d accessor functor More...
 
__device__ __host__ void print () const
 Prints the NsxNc complex elements of the color spinor. More...
 
template<typename S >
__device__ __host__ void operator= (const colorspinor_wrapper< T, S > &a)
 
template<typename S >
__device__ __host__ ColorSpinor (const colorspinor_wrapper< T, S > &a)
 
template<typename S >
__device__ __host__ void operator= (const colorspinor_ghost_wrapper< T, S > &a)
 
template<typename S >
__device__ __host__ ColorSpinor (const colorspinor_ghost_wrapper< T, S > &a)
 

Public Attributes

complex< Float > data [size]
 

Static Public Attributes

static constexpr int size = Nc * Ns
 

Detailed Description

template<typename Float, int Nc, int Ns>
struct quda::ColorSpinor< Float, Nc, Ns >

This is the generic declaration of ColorSpinor.

Definition at line 24 of file color_spinor.h.

Constructor & Destructor Documentation

◆ ColorSpinor() [1/6]

template<typename Float , int Nc, int Ns>
__device__ __host__ quda::ColorSpinor< Float, Nc, Ns >::ColorSpinor ( )
inline

Definition at line 29 of file color_spinor.h.

◆ ColorSpinor() [2/6]

template<typename Float , int Nc, int Ns>
__device__ __host__ quda::ColorSpinor< Float, Nc, Ns >::ColorSpinor ( const ColorSpinor< Float, Nc, Ns > &  a)
inline

Definition at line 35 of file color_spinor.h.

◆ ColorSpinor() [3/6]

template<typename Float , int Nc, int Ns>
template<typename S >
__device__ __host__ quda::ColorSpinor< Float, Nc, Ns >::ColorSpinor ( const colorspinor_wrapper< Float, S > &  s)
inline

◆ ColorSpinor() [4/6]

template<typename Float , int Nc, int Ns>
template<typename S >
__device__ __host__ quda::ColorSpinor< Float, Nc, Ns >::ColorSpinor ( const colorspinor_ghost_wrapper< Float, S > &  s)
inline

◆ ColorSpinor() [5/6]

template<typename T , int Nc>
template<typename S >
__device__ __host__ quda::ColorSpinor< T, Nc >::ColorSpinor ( const colorspinor_wrapper< T, S > &  a)
inline

Definition at line 73 of file color_spinor_field_order.h.

◆ ColorSpinor() [6/6]

template<typename T , int Nc>
template<typename S >
__device__ __host__ quda::ColorSpinor< T, Nc >::ColorSpinor ( const colorspinor_ghost_wrapper< T, S > &  a)
inline

Definition at line 157 of file color_spinor_field_order.h.

Member Function Documentation

◆ operator()() [1/4]

template<typename Float , int Nc, int Ns>
__device__ __host__ complex<Float>& quda::ColorSpinor< Float, Nc, Ns >::operator() ( int  idx)
inline

1-d accessor functor

Parameters
[in]idxIndex
Returns
Complex number at this index

Definition at line 111 of file color_spinor.h.

◆ operator()() [2/4]

template<typename Float , int Nc, int Ns>
__device__ __host__ const complex<Float>& quda::ColorSpinor< Float, Nc, Ns >::operator() ( int  idx) const
inline

1-d accessor functor

Parameters
[in]idxIndex
Returns
Complex number at this index

Definition at line 118 of file color_spinor.h.

◆ operator()() [3/4]

template<typename Float , int Nc, int Ns>
__device__ __host__ complex<Float>& quda::ColorSpinor< Float, Nc, Ns >::operator() ( int  s,
int  c 
)
inline

2-d accessor functor

Parameters
[in]sSpin index
[in]cColor index
Returns
Complex number at this spin and color index

Definition at line 96 of file color_spinor.h.

◆ operator()() [4/4]

template<typename Float , int Nc, int Ns>
__device__ __host__ const complex<Float>& quda::ColorSpinor< Float, Nc, Ns >::operator() ( int  s,
int  c 
) const
inline

2-d accessor functor

Parameters
[in]sSpin index
[in]cColor index
Returns
Complex number at this spin and color index

Definition at line 104 of file color_spinor.h.

◆ operator*=()

template<typename Float , int Nc, int Ns>
template<typename T >
__device__ __host__ ColorSpinor<Float, Nc, Ns>& quda::ColorSpinor< Float, Nc, Ns >::operator*= ( const T &  a)
inline

Definition at line 62 of file color_spinor.h.

◆ operator+=()

template<typename Float , int Nc, int Ns>
__device__ __host__ ColorSpinor<Float, Nc, Ns>& quda::ColorSpinor< Float, Nc, Ns >::operator+= ( const ColorSpinor< Float, Nc, Ns > &  a)
inline

Definition at line 56 of file color_spinor.h.

◆ operator-()

template<typename Float , int Nc, int Ns>
__device__ __host__ ColorSpinor<Float, Nc, Ns> quda::ColorSpinor< Float, Nc, Ns >::operator- ( ) const
inline

Definition at line 48 of file color_spinor.h.

◆ operator-=()

template<typename Float , int Nc, int Ns>
__device__ __host__ ColorSpinor<Float, Nc, Ns>& quda::ColorSpinor< Float, Nc, Ns >::operator-= ( const ColorSpinor< Float, Nc, Ns > &  a)
inline

Definition at line 69 of file color_spinor.h.

◆ operator=() [1/5]

template<typename Float , int Nc, int Ns>
__device__ __host__ ColorSpinor<Float, Nc, Ns>& quda::ColorSpinor< Float, Nc, Ns >::operator= ( const ColorSpinor< Float, Nc, Ns > &  a)
inline

Definition at line 40 of file color_spinor.h.

◆ operator=() [2/5]

template<typename Float , int Nc, int Ns>
template<typename S >
__device__ __host__ void quda::ColorSpinor< Float, Nc, Ns >::operator= ( const colorspinor_ghost_wrapper< Float, S > &  s)
inline

◆ operator=() [3/5]

template<typename T , int Nc>
template<typename S >
__device__ __host__ void quda::ColorSpinor< T, Nc >::operator= ( const colorspinor_ghost_wrapper< T, S > &  a)
inline

Definition at line 151 of file color_spinor_field_order.h.

◆ operator=() [4/5]

template<typename Float , int Nc, int Ns>
template<typename S >
__device__ __host__ void quda::ColorSpinor< Float, Nc, Ns >::operator= ( const colorspinor_wrapper< Float, S > &  s)
inline

◆ operator=() [5/5]

template<typename T , int Nc>
template<typename S >
__device__ __host__ void quda::ColorSpinor< T, Nc >::operator= ( const colorspinor_wrapper< T, S > &  a)
inline

Definition at line 67 of file color_spinor_field_order.h.

◆ print()

template<typename Float , int Nc, int Ns>
__device__ __host__ void quda::ColorSpinor< Float, Nc, Ns >::print ( ) const
inline

Prints the NsxNc complex elements of the color spinor.

Definition at line 123 of file color_spinor.h.

Member Data Documentation

◆ data

template<typename Float , int Nc, int Ns>
complex<Float> quda::ColorSpinor< Float, Nc, Ns >::data[size]

Definition at line 27 of file color_spinor.h.

◆ size

template<typename Float , int Nc, int Ns>
constexpr int quda::ColorSpinor< Float, Nc, Ns >::size = Nc * Ns
staticconstexpr

Definition at line 26 of file color_spinor.h.


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