#include <iostream>#include <limits>#include <cstdlib>#include <cstring>#include <BoxLib.H>#include <FabConv.H>#include <FArrayBox.H>#include <FPC.H>#include <REAL.H>

Defines | |
| #define | GETARRAY(TYPE) |
| #define | PUTARRAY(TYPE) |
Functions | |
| static const int * | selectOrdering (int prec, int ordering) |
| void | ONES_COMP_NEG (long &n, int nb, long incr) |
| int | _PD_get_bit (char *base, int offs, int nby, const int *ord) |
| static long | _PD_extract_field (char *in, int offs, int nbi, int nby, const int *ord) |
| static void | _PD_btrvout (char *out, long nb, long nitems) |
| void | _PD_insert_field (long in_long, int nb, char *out, int offs, int l_order, int l_bytes) |
| void | _PD_set_bit (char *base, int offs) |
| static void | _PD_reorder (char *arr, long nitems, int nbytes, const int *ord) |
| static void | permute_real_word_order (void *out, const void *in, long nitems, const int *outord, const int *inord) |
| void | PD_fconvert (void *out, const void *in, long nitems, int boffs, const long *outfor, const int *outord, const long *infor, const int *inord, int l_order, int l_bytes, int onescmp) |
| static void | PD_fixdenormals (void *out, long nitems, const long *outfor, const int *outord) |
| std::ostream & | operator<< (std::ostream &os, const RealDescriptor &id) |
| Write out an RealDescriptor to an ostream in ASCII. | |
| std::istream & | operator>> (std::istream &is, RealDescriptor &rd) |
| Read in a RealDescriptor from an istream. | |
| static void | PD_convert (void *out, const void *in, long nitems, int boffs, const RealDescriptor &od, const RealDescriptor &id, const IntDescriptor &ld, int onescmp=0) |
Variables | |
| const int | BitsMax = 8*sizeof(long) |
| const int | REVERSE_ORDER = 2 |
| #define GETARRAY | ( | TYPE | ) |
Value:
static \ void \ getarray (std::istream& is, \ Array< TYPE >& ar) \ { \ char c; \ is >> c; \ if (c != '(') \ BoxLib::Error("getarray(istream&): expected a \'(\'"); \ int size; \ is >> size; \ is >> c; \ if ( c != ',') \ BoxLib::Error("getarray(istream&): expected a \',\'"); \ is >> c; \ if (c != '(') \ BoxLib::Error("getarray(istream&): expected a \'(\'"); \ ar.resize(size); \ for(int i = 0; i < size; ++i) \ is >> ar[i]; \ is >> c; \ if (c != ')') \ BoxLib::Error("getarray(istream&): expected a \')\'"); \ is >> c; \ if (c != ')') \ BoxLib::Error("getarray(istream&): expected a \')\'"); \ }
| #define PUTARRAY | ( | TYPE | ) |
Value:
static \ void \ putarray (std::ostream& os, \ const Array< TYPE >& ar) \ { \ int i; \ os << '('; \ os << ar.size() << ", ("; \ for (i = 0; i < ar.size(); ++i) \ { \ os << ar[i]; \ if (i != ar.size() - 1) \ os << ' '; \ } \ os << "))"; \ }
| static void _PD_btrvout | ( | char * | out, | |
| long | nb, | |||
| long | nitems | |||
| ) | [static] |
Referenced by _PD_insert_field().
| static long _PD_extract_field | ( | char * | in, | |
| int | offs, | |||
| int | nbi, | |||
| int | nby, | |||
| const int * | ord | |||
| ) | [static] |
Referenced by PD_fconvert(), and PD_fixdenormals().
| int _PD_get_bit | ( | char * | base, | |
| int | offs, | |||
| int | nby, | |||
| const int * | ord | |||
| ) | [inline] |
Referenced by PD_fconvert().
| void _PD_insert_field | ( | long | in_long, | |
| int | nb, | |||
| char * | out, | |||
| int | offs, | |||
| int | l_order, | |||
| int | l_bytes | |||
| ) | [inline] |
| static void _PD_reorder | ( | char * | arr, | |
| long | nitems, | |||
| int | nbytes, | |||
| const int * | ord | |||
| ) | [static] |
Referenced by PD_fconvert().
| void _PD_set_bit | ( | char * | base, | |
| int | offs | |||
| ) | [inline] |
Referenced by PD_fconvert().
| void ONES_COMP_NEG | ( | long & | n, | |
| int | nb, | |||
| long | incr | |||
| ) | [inline] |
Referenced by PD_fconvert().
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const RealDescriptor & | id | |||
| ) |
Write out an RealDescriptor to an ostream in ASCII.
References BoxLib::Error(), RealDescriptor::formatarray(), and RealDescriptor::orderarray().
| std::istream& operator>> | ( | std::istream & | is, | |
| RealDescriptor & | rd | |||
| ) |
Read in a RealDescriptor from an istream.
References Array< T >::dataPtr(), BoxLib::Error(), RealDescriptor::ord, RealDescriptor::RealDescriptor(), and Array< T >::size().
| static void PD_convert | ( | void * | out, | |
| const void * | in, | |||
| long | nitems, | |||
| int | boffs, | |||
| const RealDescriptor & | od, | |||
| const RealDescriptor & | id, | |||
| const IntDescriptor & | ld, | |||
| int | onescmp = 0 | |||
| ) | [static] |
References BL_ASSERT, FPC::CrayRealDescriptor(), RealDescriptor::format(), RealDescriptor::formatarray(), FPC::Ieee32NormalRealDescriptor(), FPC::Ieee64NormalRealDescriptor(), FPC::NativeRealDescriptor(), IntDescriptor::numBytes(), RealDescriptor::numBytes(), IntDescriptor::order(), RealDescriptor::order(), PD_fconvert(), PD_fixdenormals(), and permute_real_word_order().
Referenced by RealDescriptor::convertFromNativeFormat(), and RealDescriptor::convertToNativeFormat().
| void PD_fconvert | ( | void * | out, | |
| const void * | in, | |||
| long | nitems, | |||
| int | boffs, | |||
| const long * | outfor, | |||
| const int * | outord, | |||
| const long * | infor, | |||
| const int * | inord, | |||
| int | l_order, | |||
| int | l_bytes, | |||
| int | onescmp | |||
| ) |
References _PD_extract_field(), _PD_get_bit(), _PD_insert_field(), _PD_reorder(), _PD_set_bit(), BitsMax, BL_ASSERT, and ONES_COMP_NEG().
Referenced by PD_convert().
| static void PD_fixdenormals | ( | void * | out, | |
| long | nitems, | |||
| const long * | outfor, | |||
| const int * | outord | |||
| ) | [static] |
References _PD_extract_field().
Referenced by RealDescriptor::convertToNativeFormat(), and PD_convert().
| static void permute_real_word_order | ( | void * | out, | |
| const void * | in, | |||
| long | nitems, | |||
| const int * | outord, | |||
| const int * | inord | |||
| ) | [static] |
Referenced by PD_convert().
| static const int* selectOrdering | ( | int | prec, | |
| int | ordering | |||
| ) | [static] |
References BoxLib::Error(), FABio::FAB_DOUBLE, FABio::FAB_FLOAT, FABio::FAB_NORMAL_ORDER, FABio::FAB_REVERSE_ORDER, FABio::FAB_REVERSE_ORDER_2, FPC::normal_double_order, FPC::normal_float_order, FPC::reverse_double_order, FPC::reverse_double_order_2, FPC::reverse_float_order, and FPC::reverse_float_order_2.
Referenced by RealDescriptor::newRealDescriptor().
| const int BitsMax = 8*sizeof(long) |
Referenced by _PD_insert_field(), and PD_fconvert().
| const int REVERSE_ORDER = 2 |
Referenced by _PD_insert_field().
1.5.5