QUDA  v1.1.0
A library for QCD on GPUs
Namespaces | Functions
convert.h File Reference
#include <type_traits>
#include <quda_internal.h>
#include <register_traits.h>

Go to the source code of this file.

Namespaces

 quda
 

Functions

template<typename T >
__host__ __device__ float quda::i2f (T a)
 
__device__ __host__ int quda::f2i (float f)
 
__device__ __host__ int quda::d2i (double d)
 
template<typename T1 , typename T2 >
__host__ __device__ std::enable_if<!isFixed< T1 >::value &&!isFixed< T2 >::value, void >::type quda::copy (T1 &a, const T2 &b)
 Copy function which is trival between floating point types. When converting to an integer type, the input float is assumed to be in the range [-1,1] and we rescale to saturate the integer range. When converting from an integer type, we scale the output to be on the same range. More...
 
template<typename T1 , typename T2 >
__host__ __device__ std::enable_if<!isFixed< T1 >::value &&isFixed< T2 >::value, void >::type quda::copy (T1 &a, const T2 &b)
 
template<typename T1 , typename T2 >
__host__ __device__ std::enable_if< isFixed< T1 >::value &&!isFixed< T2 >::value, void >::type quda::copy (T1 &a, const T2 &b)
 
template<typename T1 , typename T2 >
__host__ __device__ std::enable_if<!isFixed< T1 >::value, void >::type quda::copy_scaled (T1 &a, const T2 &b)
 Specialized variants of the copy function that assumes the scaling factor has already been done. More...
 
template<typename T1 , typename T2 >
__host__ __device__ std::enable_if< isFixed< T1 >::value, void >::type quda::copy_scaled (T1 &a, const T2 &b)
 
template<typename T1 , typename T2 , typename T3 >
__host__ __device__ std::enable_if<!isFixed< T2 >::value, void >::type quda::copy_and_scale (T1 &a, const T2 &b, const T3 &c)
 Specialized variants of the copy function that include an additional scale factor. Note the scale factor is ignored unless the input type (b) is either a short or char vector. More...
 
template<typename T1 , typename T2 , typename T3 >
__host__ __device__ std::enable_if< isFixed< T2 >::value, void >::type quda::copy_and_scale (T1 &a, const T2 &b, const T3 &c)
 

Detailed Description

DESCRIPTION

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

Definition in file convert.h.