ATLAS Offline Software
Loading...
Searching...
No Matches
FPHelpers.h File Reference

Contains functions to deal with arbitrary IEEE754-like floating point formats. More...

#include <cstdint>
#include <climits>
#include <cstring>
Include dependency graph for FPHelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FloatingPointHelpers::IEEE754_like< mantiss, exp, tag >
 Specifies a floating point format like those described in IEEE-754, with an adjustable number of bits in the exponent and mantissa. More...
struct  FloatingPointHelpers::ConversionHelper< FLarge, FSmall >
struct  FloatingPointHelpers::ConversionHelper< StandardDouble, StandardFloat >
struct  FloatingPointHelpers::ConversionHelper< Format, Format >

Namespaces

namespace  FloatingPointHelpers
namespace  FloatingPointHelpers::LeadingZerosPortability
namespace  FloatingPointHelpers::OperatorsHelper
namespace  FloatingPointHelpers::BitCastHelper

Macros

#define CALORECGPU_INCLUDE_CUDA_SUPPORT   1
#define CALORECGPU_MULTIPLE_PORTABILITY_CLZ_FUNC_HELPER(ATTRIB, TYPE, BUILTIN)

Typedefs

using FloatingPointHelpers::StandardFloat = IEEE754_like<23, 8>
using FloatingPointHelpers::StandardDouble = IEEE754_like<52, 11>
using FloatingPointHelpers::CUDAHalfFloat = IEEE754_like<10, 5>
using FloatingPointHelpers::CUDABFloat16 = IEEE754_like<7, 8>

Enumerations

enum class  FloatingPointHelpers::RoundingModes {
  FloatingPointHelpers::ToPlusInfinity , FloatingPointHelpers::ToMinusInfinity , FloatingPointHelpers::ToZero , FloatingPointHelpers::ToNearestEven ,
  FloatingPointHelpers::ToNearestAwayFromZero , FloatingPointHelpers::Default = ToNearestEven
}
 Specifies the rounding mode to use for the operations. More...

Detailed Description

Contains functions to deal with arbitrary IEEE754-like floating point formats.

Definition in file FPHelpers.h.

Macro Definition Documentation

◆ CALORECGPU_INCLUDE_CUDA_SUPPORT

#define CALORECGPU_INCLUDE_CUDA_SUPPORT   1

Definition at line 12 of file FPHelpers.h.

◆ CALORECGPU_MULTIPLE_PORTABILITY_CLZ_FUNC_HELPER

#define CALORECGPU_MULTIPLE_PORTABILITY_CLZ_FUNC_HELPER ( ATTRIB,
TYPE,
BUILTIN )
Value:
template<> \
ATTRIB inline unsigned int count_leading_zeros(const TYPE num) \
{ \
if (!num) \
{ \
return sizeof(TYPE) * CHAR_BIT; \
} \
return BUILTIN(num); \
} \
#define TYPE(CODE, TYP, IOTYP)

Definition at line 94 of file FPHelpers.h.

94#define CALORECGPU_MULTIPLE_PORTABILITY_CLZ_FUNC_HELPER(ATTRIB, TYPE, BUILTIN) \
95 template<> \
96 ATTRIB inline unsigned int count_leading_zeros(const TYPE num) \
97 { \
98 if (!num) \
99 { \
100 return sizeof(TYPE) * CHAR_BIT; \
101 } \
102 return BUILTIN(num); \
103 } \
104