Block-Structured AMR Software Framework
amrex::FPC Class Reference

A Collection of Floating-Point Constants Supporting FAB I/O. More...

#include <AMReX_FPC.H>

Static Public Member Functions

static const IntDescriptorNativeLongDescriptor ()
 Returns a constant reference to an IntDescriptor describing the native "Long" under which AMReX was compiled. Each AMReX library will have exactly one of these compiled into it. More...
 
static const IntDescriptorNativeIntDescriptor ()
 Returns a constant reference to an IntDescriptor describing the native "int" under which AMReX was compiled. Each AMReX library will have exactly one of these compiled into it. More...
 
static const RealDescriptorNativeRealDescriptor ()
 Returns a constant reference to a RealDescriptor describing the native Real under which AMReX was compiled. Each AMReX library will have exactly one of these compiled into it. Note that "Real" will be one of "float" or "double" depending on how the version of AMReX was built. More...
 
static const RealDescriptorNative32RealDescriptor ()
 NativeRealDescriptor is equivalent to Native32RealDescriptor if BL_FLOAT is used. Otherwise, it is equivalent to Native64RealDescriptor. More...
 
static const RealDescriptorNative64RealDescriptor ()
 
static const RealDescriptorIeee32NormalRealDescriptor ()
 Returns a constant reference to a RealDescriptor detailing the IEEE 32-bit normal FP format. More...
 
static const RealDescriptorIeee64NormalRealDescriptor ()
 Returns a constant reference to a RealDescriptor detailing the IEEE 64-bit normal FP format. More...
 

Static Public Attributes

static const int normal_float_order [] = { 1, 2, 3, 4 }
 4-element array representing "normal" float order: {1,2,3,4} More...
 
static const int reverse_float_order [] = { 4, 3, 2, 1 }
 4-element array representing "reverse" float order: {4,3,2,1} More...
 
static const int reverse_float_order_2 [] = { 2, 1, 4, 3 }
 Another "reversed" FP order: {2,1,4,3}. More...
 
static const int normal_double_order [] = { 1, 2, 3, 4, 5, 6, 7, 8 }
 The "normal" double order: {1,2,3,4,5,6,7,8}. More...
 
static const int reverse_double_order [] = { 8, 7, 6, 5, 4, 3, 2, 1 }
 A "reversed" double order: {8,7,6,5,4,3,2,1}. More...
 
static const int reverse_double_order_2 [] = { 2, 1, 4, 3, 6, 5, 8, 7 }
 Another "reversed" double order: {2,1,4,3,6,5,8,7}. More...
 
static const Long ieee_float [] = { 32L, 8L, 23L, 0L, 1L, 9L, 0L, 0x7FL }
 Array detailing the format of IEEE 32-bit normal order floats. In general, here's what the various indices in "format" array means: format[0] = number of bits per number format[1] = number of bits in exponent format[2] = number of bits in mantissa format[3] = start bit of sign format[4] = start bit of exponent format[5] = start bit of mantissa format[6] = high order mantissa bit (CRAY needs this) format[7] = bias of exponent. More...
 
static const Long ieee_double [] = { 64L, 11L, 52L, 0L, 1L, 12L, 0L, 0x3FFL }
 Array detailing the format of IEEE 64-bit normal order doubles. More...
 

Detailed Description

A Collection of Floating-Point Constants Supporting FAB I/O.

This class is a poor-person's namespace of floating-point constants used in support of FAB I/O. Since we can't assume the existence of namespaces, and we don't like global constants, we make them static constant data members of this class.

Member Function Documentation

◆ Ieee32NormalRealDescriptor()

const RealDescriptor & amrex::FPC::Ieee32NormalRealDescriptor ( )
static

Returns a constant reference to a RealDescriptor detailing the IEEE 32-bit normal FP format.

◆ Ieee64NormalRealDescriptor()

const RealDescriptor & amrex::FPC::Ieee64NormalRealDescriptor ( )
static

Returns a constant reference to a RealDescriptor detailing the IEEE 64-bit normal FP format.

◆ Native32RealDescriptor()

const RealDescriptor & amrex::FPC::Native32RealDescriptor ( )
static

NativeRealDescriptor is equivalent to Native32RealDescriptor if BL_FLOAT is used. Otherwise, it is equivalent to Native64RealDescriptor.

◆ Native64RealDescriptor()

const RealDescriptor & amrex::FPC::Native64RealDescriptor ( )
static

◆ NativeIntDescriptor()

const IntDescriptor & amrex::FPC::NativeIntDescriptor ( )
static

Returns a constant reference to an IntDescriptor describing the native "int" under which AMReX was compiled. Each AMReX library will have exactly one of these compiled into it.

◆ NativeLongDescriptor()

const IntDescriptor & amrex::FPC::NativeLongDescriptor ( )
static

Returns a constant reference to an IntDescriptor describing the native "Long" under which AMReX was compiled. Each AMReX library will have exactly one of these compiled into it.

◆ NativeRealDescriptor()

const RealDescriptor & amrex::FPC::NativeRealDescriptor ( )
static

Returns a constant reference to a RealDescriptor describing the native Real under which AMReX was compiled. Each AMReX library will have exactly one of these compiled into it. Note that "Real" will be one of "float" or "double" depending on how the version of AMReX was built.

Member Data Documentation

◆ ieee_double

const Long amrex::FPC::ieee_double = { 64L, 11L, 52L, 0L, 1L, 12L, 0L, 0x3FFL }
static

Array detailing the format of IEEE 64-bit normal order doubles.

◆ ieee_float

const Long amrex::FPC::ieee_float = { 32L, 8L, 23L, 0L, 1L, 9L, 0L, 0x7FL }
static

Array detailing the format of IEEE 32-bit normal order floats. In general, here's what the various indices in "format" array means: format[0] = number of bits per number format[1] = number of bits in exponent format[2] = number of bits in mantissa format[3] = start bit of sign format[4] = start bit of exponent format[5] = start bit of mantissa format[6] = high order mantissa bit (CRAY needs this) format[7] = bias of exponent.

◆ normal_double_order

const int amrex::FPC::normal_double_order = { 1, 2, 3, 4, 5, 6, 7, 8 }
static

The "normal" double order: {1,2,3,4,5,6,7,8}.

◆ normal_float_order

const int amrex::FPC::normal_float_order = { 1, 2, 3, 4 }
static

4-element array representing "normal" float order: {1,2,3,4}

◆ reverse_double_order

const int amrex::FPC::reverse_double_order = { 8, 7, 6, 5, 4, 3, 2, 1 }
static

A "reversed" double order: {8,7,6,5,4,3,2,1}.

◆ reverse_double_order_2

const int amrex::FPC::reverse_double_order_2 = { 2, 1, 4, 3, 6, 5, 8, 7 }
static

Another "reversed" double order: {2,1,4,3,6,5,8,7}.

◆ reverse_float_order

const int amrex::FPC::reverse_float_order = { 4, 3, 2, 1 }
static

4-element array representing "reverse" float order: {4,3,2,1}

◆ reverse_float_order_2

const int amrex::FPC::reverse_float_order_2 = { 2, 1, 4, 3 }
static

Another "reversed" FP order: {2,1,4,3}.


The documentation for this class was generated from the following files: