FPC Class Reference

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

#include <FPC.H>

List of all members.

Static Public Member Functions

static const IntDescriptorNativeLongDescriptor ()
 Returns a constant reference to an IntDescriptor describing the native "long" under which BoxLib was compiled.
static const RealDescriptorNativeRealDescriptor ()
 Returns a constant reference to a RealDescriptor describing the native Real under which BoxLib was compiled.
static const RealDescriptorCrayRealDescriptor ()
 Returns a constant reference to a RealDescriptor detailing the Cray FP format.
static const RealDescriptorIeee32NormalRealDescriptor ()
 Returns a constant reference to a RealDescriptor detailing the IEEE 32-bit normal FP format.
static const RealDescriptorIeee64NormalRealDescriptor ()
 Returns a constant reference to a RealDescriptor detailing the IEEE 64-bit normal FP format.

Static Public Attributes

static const int normal_float_order [] = { 1, 2, 3, 4 }
 4-element array representing "normal" float order: {1,2,3,4}
static const int reverse_float_order [] = { 4, 3, 2, 1 }
 4-element array representing "reverse" float order: {4,3,2,1}
static const int reverse_float_order_2 [] = { 2, 1, 4, 3 }
 Another "reversed" FP order: {2,1,4,3}.
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}.
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}.
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}.
static const int cray_float_order [] = { 1, 2, 3, 4, 5, 6, 7, 8 }
 The Cray float order: {1,2,3,4,5,6,7,8}.
static const long ieee_float [] = { 32L, 8L, 23L, 0L, 1L, 9L, 0L, 0x7FL }
 Array detailing the format of IEEE 32-bit normal order floats.
static const long ieee_double [] = { 64L, 11L, 52L, 0L, 1L, 12L, 0L, 0x3FFL }
 Array detailing the format of IEEE 64-bit normal order doubles.
static const long cray_float [] = { 64L, 15L, 48L, 0L, 1L, 16L, 1L, 0x4000L }
 Array detailing the format of Cray floating point.


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

const IntDescriptor & FPC::NativeLongDescriptor (  )  [static]

Returns a constant reference to an IntDescriptor describing the native "long" under which BoxLib was compiled.

Each BoxLib library will have exactly one of these compiled into it.

References IntDescriptor::NormalOrder, and IntDescriptor::ReverseOrder.

Referenced by RealDescriptor::convertFromNativeFormat(), and RealDescriptor::convertToNativeFormat().

const RealDescriptor & FPC::NativeRealDescriptor (  )  [static]

Returns a constant reference to a RealDescriptor describing the native Real under which BoxLib was compiled.

Each BoxLib 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 BoxLib was built.

References cray_float, cray_float_order, ieee_double, ieee_float, normal_double_order, normal_float_order, reverse_double_order, and reverse_float_order.

Referenced by RealDescriptor::convertFromNativeFormat(), RealDescriptor::convertToNativeFormat(), FArrayBox::Initialize(), PD_convert(), and FArrayBox::setFormat().

const RealDescriptor & FPC::CrayRealDescriptor (  )  [static]

Returns a constant reference to a RealDescriptor detailing the Cray FP format.

References cray_float, and cray_float_order.

Referenced by PD_convert().

const RealDescriptor & FPC::Ieee32NormalRealDescriptor (  )  [static]

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

References ieee_float, and normal_float_order.

Referenced by FArrayBox::Initialize(), PD_convert(), and FArrayBox::setFormat().

const RealDescriptor & FPC::Ieee64NormalRealDescriptor (  )  [static]

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

References ieee_double, and normal_double_order.

Referenced by PD_convert().


Member Data Documentation

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

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

Referenced by Ieee32NormalRealDescriptor(), NativeRealDescriptor(), and selectOrdering().

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

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

Referenced by NativeRealDescriptor(), and selectOrdering().

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

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

Referenced by selectOrdering().

const int 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}.

Referenced by Ieee64NormalRealDescriptor(), NativeRealDescriptor(), and selectOrdering().

const int 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}.

Referenced by NativeRealDescriptor(), and selectOrdering().

const int 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}.

Referenced by selectOrdering().

const int FPC::cray_float_order = { 1, 2, 3, 4, 5, 6, 7, 8 } [static]

The Cray float order: {1,2,3,4,5,6,7,8}.

Referenced by CrayRealDescriptor(), NativeRealDescriptor(), and RealDescriptor::newRealDescriptor().

const long 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

Referenced by Ieee32NormalRealDescriptor(), NativeRealDescriptor(), and RealDescriptor::newRealDescriptor().

const long FPC::ieee_double = { 64L, 11L, 52L, 0L, 1L, 12L, 0L, 0x3FFL } [static]

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

Referenced by Ieee64NormalRealDescriptor(), NativeRealDescriptor(), and RealDescriptor::newRealDescriptor().

const long FPC::cray_float = { 64L, 15L, 48L, 0L, 1L, 16L, 1L, 0x4000L } [static]

Array detailing the format of Cray floating point.

Referenced by CrayRealDescriptor(), NativeRealDescriptor(), and RealDescriptor::newRealDescriptor().


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

Generated on Fri Nov 21 10:11:02 2008 for AMRParticlePaths by  doxygen 1.5.5