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

fieldorder_wrapper is an internal class that is used to wrap instances of FieldOrder accessors, currying in the specific location on the field. This is used as a helper class for fixed-point accessors providing the necessary conversion and scaling when writing to a fixed-point field. More...

#include <color_spinor_field_order.h>

Public Types

using type = Float
 
using store_type = storeFloat
 

Public Member Functions

__device__ __host__ fieldorder_wrapper (complex< storeFloat > *v, int idx, Float scale, Float scale_inv)
 fieldorder_wrapper constructor More...
 
__device__ __host__ Float real () const
 
__device__ __host__ Float imag () const
 
__device__ __host__ void real (const Float &a)
 
__device__ __host__ void imag (const Float &a)
 
__device__ __host__ auto data ()
 returns the pointor of this wrapper object More...
 
__device__ __host__ const auto data () const
 
__device__ __host__ complex< Float > operator- () const
 negation operator More...
 
__device__ __host__ void operator= (const fieldorder_wrapper< Float, storeFloat > &a)
 Assignment operator with fieldorder_wrapper instance as input. More...
 
template<typename theirFloat >
__device__ __host__ void operator= (const complex< theirFloat > &a)
 Assignment operator with complex number instance as input. More...
 
template<typename theirFloat >
__device__ __host__ void operator= (const theirFloat &a)
 Assignment operator with real number instance as input. More...
 
template<typename theirFloat >
__device__ __host__ void operator+= (const complex< theirFloat > &a)
 Operator+= with complex number instance as input. More...
 
template<typename theirFloat >
__device__ __host__ void operator-= (const complex< theirFloat > &a)
 Operator-= with complex number instance as input. More...
 

Public Attributes

complex< storeFloat > * v
 
const int idx
 
const Float scale
 
const Float scale_inv
 

Static Public Attributes

static constexpr bool fixed = fixed_point<Float, storeFloat>()
 

Detailed Description

template<typename Float, typename storeFloat>
struct quda::colorspinor::fieldorder_wrapper< Float, storeFloat >

fieldorder_wrapper is an internal class that is used to wrap instances of FieldOrder accessors, currying in the specific location on the field. This is used as a helper class for fixed-point accessors providing the necessary conversion and scaling when writing to a fixed-point field.

Definition at line 461 of file color_spinor_field_order.h.

Member Typedef Documentation

◆ store_type

template<typename Float , typename storeFloat >
using quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::store_type = storeFloat

Definition at line 466 of file color_spinor_field_order.h.

◆ type

template<typename Float , typename storeFloat >
using quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::type = Float

computing type and storage types that can be inferred from this object.

Definition at line 465 of file color_spinor_field_order.h.

Constructor & Destructor Documentation

◆ fieldorder_wrapper()

template<typename Float , typename storeFloat >
__device__ __host__ quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::fieldorder_wrapper ( complex< storeFloat > *  v,
int  idx,
Float  scale,
Float  scale_inv 
)
inline

fieldorder_wrapper constructor

Parameters
idxField index

Definition at line 477 of file color_spinor_field_order.h.

Member Function Documentation

◆ data() [1/2]

template<typename Float , typename storeFloat >
__device__ __host__ auto quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::data ( )
inline

returns the pointor of this wrapper object

Definition at line 519 of file color_spinor_field_order.h.

◆ data() [2/2]

template<typename Float , typename storeFloat >
__device__ __host__ const auto quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::data ( ) const
inline

Definition at line 521 of file color_spinor_field_order.h.

◆ imag() [1/2]

template<typename Float , typename storeFloat >
__device__ __host__ Float quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::imag ( ) const
inline

Definition at line 493 of file color_spinor_field_order.h.

◆ imag() [2/2]

template<typename Float , typename storeFloat >
__device__ __host__ void quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::imag ( const Float &  a)
inline

Definition at line 508 of file color_spinor_field_order.h.

◆ operator+=()

template<typename Float , typename storeFloat >
template<typename theirFloat >
__device__ __host__ void quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::operator+= ( const complex< theirFloat > &  a)
inline

Operator+= with complex number instance as input.

Parameters
aComplex number we want to add to this accessor

Definition at line 564 of file color_spinor_field_order.h.

◆ operator-()

template<typename Float , typename storeFloat >
__device__ __host__ complex<Float> quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::operator- ( ) const
inline

negation operator

Returns
negation of this complex number

Definition at line 527 of file color_spinor_field_order.h.

◆ operator-=()

template<typename Float , typename storeFloat >
template<typename theirFloat >
__device__ __host__ void quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::operator-= ( const complex< theirFloat > &  a)
inline

Operator-= with complex number instance as input.

Parameters
aComplex number we want to subtract from this accessor

Definition at line 577 of file color_spinor_field_order.h.

◆ operator=() [1/3]

template<typename Float , typename storeFloat >
template<typename theirFloat >
__device__ __host__ void quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::operator= ( const complex< theirFloat > &  a)
inline

Assignment operator with complex number instance as input.

Parameters
aComplex number we want to store in this accessor

Definition at line 544 of file color_spinor_field_order.h.

◆ operator=() [2/3]

template<typename Float , typename storeFloat >
__device__ __host__ void quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::operator= ( const fieldorder_wrapper< Float, storeFloat > &  a)
inline

Assignment operator with fieldorder_wrapper instance as input.

Parameters
afieldorder_wrapper we are copying from

Definition at line 535 of file color_spinor_field_order.h.

◆ operator=() [3/3]

template<typename Float , typename storeFloat >
template<typename theirFloat >
__device__ __host__ void quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::operator= ( const theirFloat &  a)
inline

Assignment operator with real number instance as input.

Parameters
areal number we want to store in this accessor

Definition at line 557 of file color_spinor_field_order.h.

◆ real() [1/2]

template<typename Float , typename storeFloat >
__device__ __host__ Float quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::real ( ) const
inline

Definition at line 485 of file color_spinor_field_order.h.

◆ real() [2/2]

template<typename Float , typename storeFloat >
__device__ __host__ void quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::real ( const Float &  a)
inline

Definition at line 501 of file color_spinor_field_order.h.

Member Data Documentation

◆ fixed

template<typename Float , typename storeFloat >
constexpr bool quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::fixed = fixed_point<Float, storeFloat>()
staticconstexpr

Definition at line 471 of file color_spinor_field_order.h.

◆ idx

template<typename Float , typename storeFloat >
const int quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::idx

Definition at line 468 of file color_spinor_field_order.h.

◆ scale

template<typename Float , typename storeFloat >
const Float quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::scale

Definition at line 469 of file color_spinor_field_order.h.

◆ scale_inv

template<typename Float , typename storeFloat >
const Float quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::scale_inv

Definition at line 470 of file color_spinor_field_order.h.

◆ v

template<typename Float , typename storeFloat >
complex<storeFloat>* quda::colorspinor::fieldorder_wrapper< Float, storeFloat >::v

Definition at line 467 of file color_spinor_field_order.h.


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