QUDA  v0.7.0
A library for QCD on GPUs
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions
convert.h File Reference
#include <quda_internal.h>

Go to the source code of this file.

Macros

#define MAX_SHORT_INV   3.051850948e-5
 

Functions

template<typename type >
int vecLength ()
 
template<>
int vecLength< short > ()
 
template<>
int vecLength< float > ()
 
template<>
int vecLength< double > ()
 
template<>
int vecLength< short2 > ()
 
template<>
int vecLength< float2 > ()
 
template<>
int vecLength< double2 > ()
 
template<>
int vecLength< short4 > ()
 
template<>
int vecLength< float4 > ()
 
template<>
int vecLength< double4 > ()
 
template<typename FloatN >
__device__ void copyFloatN (FloatN &a, const FloatN &b)
 
__device__ void copyFloatN (float2 &a, const short2 &b)
 
__device__ void copyFloatN (float4 &a, const short4 &b)
 
__device__ void copyFloatN (double2 &a, const short2 &b)
 
__device__ void copyFloatN (double4 &a, const short4 &b)
 
__device__ void copyFloatN (float2 &a, const double2 &b)
 
__device__ void copyFloatN (double2 &a, const float2 &b)
 
__device__ void copyFloatN (float4 &a, const double4 &b)
 
__device__ void copyFloatN (double4 &a, const float4 &b)
 
__device__ void copyFloatN (short2 &a, const float2 &b)
 
__device__ void copyFloatN (short4 &a, const float4 &b)
 
__device__ void copyFloatN (short2 &a, const double2 &b)
 
__device__ void copyFloatN (short4 &a, const double4 &b)
 
template<typename OutputType , typename InputType >
__device__ void convert (OutputType x[], InputType y[], const int N)
 
template<>
__device__ void convert< float2, short2 > (float2 x[], short2 y[], const int N)
 
template<>
__device__ void convert< float4, short4 > (float4 x[], short4 y[], const int N)
 
template<>
__device__ void convert< double4, double2 > (double4 x[], double2 y[], const int N)
 
template<>
__device__ void convert< double2, double4 > (double2 x[], double4 y[], const int N)
 
template<>
__device__ void convert< float4, float2 > (float4 x[], float2 y[], const int N)
 
template<>
__device__ void convert< float2, float4 > (float2 x[], float4 y[], const int N)
 
template<>
__device__ void convert< short4, float2 > (short4 x[], float2 y[], const int N)
 
template<>
__device__ void convert< float2, short4 > (float2 x[], short4 y[], const int N)
 
template<>
__device__ void convert< float4, short2 > (float4 x[], short2 y[], const int N)
 
template<>
__device__ void convert< short2, float4 > (short2 x[], float4 y[], const int N)
 
template<>
__device__ void convert< short4, double2 > (short4 x[], double2 y[], const int N)
 
template<>
__device__ void convert< double2, short4 > (double2 x[], short4 y[], const int N)
 
template<>
__device__ void convert< double4, short2 > (double4 x[], short2 y[], const int N)
 
template<>
__device__ void convert< short2, double4 > (short2 x[], double4 y[], const int N)
 
template<>
__device__ void convert< float4, double2 > (float4 x[], double2 y[], const int N)
 
template<>
__device__ void convert< double2, float4 > (double2 x[], float4 y[], const int N)
 
template<>
__device__ void convert< double4, float2 > (double4 x[], float2 y[], const int N)
 
template<>
__device__ void convert< float2, double4 > (float2 x[], double4 y[], const int N)
 

Detailed Description

DESCRIPTION

Conversion functions that are used as building blocks for arbitrary field and register ordering.

Definition in file convert.h.

Macro Definition Documentation

#define MAX_SHORT_INV   3.051850948e-5

Definition at line 29 of file convert.h.

Function Documentation

template<typename OutputType , typename InputType >
__device__ void convert ( OutputType  x[],
InputType  y[],
const int  N 
)
inline

Convert a vector of type InputType to type OutputType.

The main current limitation is that there is an implicit assumption that N * sizeof(OutputType) / sizeof(InputType) is an integer. E.g., you cannot convert a vector 9 float2s into a vector of 5 float4s.

Parameters
xOutput vector.
yInput vector.
NLength of output vector.

Definition at line 66 of file convert.h.

template<>
__device__ void convert< double2, double4 > ( double2  x[],
double4  y[],
const int  N 
)
inline

Definition at line 89 of file convert.h.

template<>
__device__ void convert< double2, float4 > ( double2  x[],
float4  y[],
const int  N 
)
inline

Definition at line 167 of file convert.h.

template<>
__device__ void convert< double2, short4 > ( double2  x[],
short4  y[],
const int  N 
)
inline

Definition at line 141 of file convert.h.

template<>
__device__ void convert< double4, double2 > ( double4  x[],
double2  y[],
const int  N 
)
inline

Definition at line 84 of file convert.h.

template<>
__device__ void convert< double4, float2 > ( double4  x[],
float2  y[],
const int  N 
)
inline

Definition at line 175 of file convert.h.

template<>
__device__ void convert< double4, short2 > ( double4  x[],
short2  y[],
const int  N 
)
inline

Definition at line 149 of file convert.h.

template<>
__device__ void convert< float2, double4 > ( float2  x[],
double4  y[],
const int  N 
)
inline

Definition at line 180 of file convert.h.

template<>
__device__ void convert< float2, float4 > ( float2  x[],
float4  y[],
const int  N 
)
inline

Definition at line 102 of file convert.h.

template<>
__device__ void convert< float2, short2 > ( float2  x[],
short2  y[],
const int  N 
)
inline

Definition at line 72 of file convert.h.

template<>
__device__ void convert< float2, short4 > ( float2  x[],
short4  y[],
const int  N 
)
inline

Definition at line 115 of file convert.h.

template<>
__device__ void convert< float4, double2 > ( float4  x[],
double2  y[],
const int  N 
)
inline

Definition at line 162 of file convert.h.

template<>
__device__ void convert< float4, float2 > ( float4  x[],
float2  y[],
const int  N 
)
inline

Definition at line 97 of file convert.h.

template<>
__device__ void convert< float4, short2 > ( float4  x[],
short2  y[],
const int  N 
)
inline

Definition at line 123 of file convert.h.

template<>
__device__ void convert< float4, short4 > ( float4  x[],
short4  y[],
const int  N 
)
inline

Definition at line 77 of file convert.h.

template<>
__device__ void convert< short2, double4 > ( short2  x[],
double4  y[],
const int  N 
)
inline

Definition at line 154 of file convert.h.

template<>
__device__ void convert< short2, float4 > ( short2  x[],
float4  y[],
const int  N 
)
inline

Definition at line 128 of file convert.h.

template<>
__device__ void convert< short4, double2 > ( short4  x[],
double2  y[],
const int  N 
)
inline

Definition at line 136 of file convert.h.

template<>
__device__ void convert< short4, float2 > ( short4  x[],
float2  y[],
const int  N 
)
inline

Definition at line 110 of file convert.h.

template<typename FloatN >
__device__ void copyFloatN ( FloatN &  a,
const FloatN &  b 
)
inline

Definition at line 34 of file convert.h.

__device__ void copyFloatN ( float2 &  a,
const short2 &  b 
)
inline

Definition at line 37 of file convert.h.

__device__ void copyFloatN ( float4 &  a,
const short4 &  b 
)
inline

Definition at line 38 of file convert.h.

__device__ void copyFloatN ( double2 &  a,
const short2 &  b 
)
inline

Definition at line 39 of file convert.h.

__device__ void copyFloatN ( double4 &  a,
const short4 &  b 
)
inline

Definition at line 40 of file convert.h.

__device__ void copyFloatN ( float2 &  a,
const double2 &  b 
)
inline

Definition at line 42 of file convert.h.

__device__ void copyFloatN ( double2 &  a,
const float2 &  b 
)
inline

Definition at line 43 of file convert.h.

__device__ void copyFloatN ( float4 &  a,
const double4 &  b 
)
inline

Definition at line 44 of file convert.h.

__device__ void copyFloatN ( double4 &  a,
const float4 &  b 
)
inline

Definition at line 45 of file convert.h.

__device__ void copyFloatN ( short2 &  a,
const float2 &  b 
)
inline

Definition at line 48 of file convert.h.

__device__ void copyFloatN ( short4 &  a,
const float4 &  b 
)
inline

Definition at line 49 of file convert.h.

__device__ void copyFloatN ( short2 &  a,
const double2 &  b 
)
inline

Definition at line 50 of file convert.h.

__device__ void copyFloatN ( short4 &  a,
const double4 &  b 
)
inline

Definition at line 51 of file convert.h.

template<typename type >
int vecLength ( )

Definition at line 14 of file convert.h.

template<>
int vecLength< double > ( )

Definition at line 18 of file convert.h.

template<>
int vecLength< double2 > ( )

Definition at line 22 of file convert.h.

template<>
int vecLength< double4 > ( )

Definition at line 26 of file convert.h.

template<>
int vecLength< float > ( )

Definition at line 17 of file convert.h.

template<>
int vecLength< float2 > ( )

Definition at line 21 of file convert.h.

template<>
int vecLength< float4 > ( )

Definition at line 25 of file convert.h.

template<>
int vecLength< short > ( )

Definition at line 16 of file convert.h.

template<>
int vecLength< short2 > ( )

Definition at line 20 of file convert.h.

template<>
int vecLength< short4 > ( )

Definition at line 24 of file convert.h.