QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Functions
short.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SHORT_LENGTH   65536
 
#define SCALE_FLOAT   ((SHORT_LENGTH-1) * 0.5)
 
#define SHIFT_FLOAT   (-1.f / (SHORT_LENGTH-1))
 

Functions

template<typename Float >
short FloatToShort (Float a)
 
template<typename Float >
Float shortToFloat (short a)
 

Macro Definition Documentation

◆ SCALE_FLOAT

#define SCALE_FLOAT   ((SHORT_LENGTH-1) * 0.5)

Definition at line 5 of file short.h.

Referenced by FloatToShort(), and shortToFloat().

◆ SHIFT_FLOAT

#define SHIFT_FLOAT   (-1.f / (SHORT_LENGTH-1))

Definition at line 6 of file short.h.

Referenced by FloatToShort(), and shortToFloat().

◆ SHORT_LENGTH

#define SHORT_LENGTH   65536

Definition at line 4 of file short.h.

Function Documentation

◆ FloatToShort()

template<typename Float >
short FloatToShort ( Float  a)
inline

Definition at line 9 of file short.h.

References SCALE_FLOAT, and SHIFT_FLOAT.

◆ shortToFloat()

template<typename Float >
Float shortToFloat ( short  a)
inline

Definition at line 16 of file short.h.

References SCALE_FLOAT, and SHIFT_FLOAT.