Mantid
|
#include "vms_convert.h"
Go to the source code of this file.
Classes | |
struct | ieee_double |
What IEEE double precision floating point looks like. More... | |
struct | ieee_single |
What IEEE single precision floating point looks like on local machine. More... | |
struct | sgl_limits_struct |
Structure holding the limits of s single. More... | |
struct | vax_double |
Vax double precision floating point. More... | |
struct | vax_single |
Vax single precision floating point. More... | |
Macros | |
#define | IEEE_DBL_BIAS 0x3ff |
#define | IEEE_SNG_BIAS 0x7f |
#define | IEEEFP 1 |
#define | MASK(nbits) ((1 << nbits) - 1) |
#define | maybe_flip_bytes(__p, __n) |
#define | mmax sgl_limits[0] |
#define | mmin sgl_limits[1] |
#define | swap_int(a) (((a) << 24) | (((a) << 8) & 0x00ff0000) | (((a) >> 8) & 0x0000ff00) | ((unsigned long)(a) >> 24)) |
#define | swap_short(a) (((a & 0xff) << 8) | ((unsigned short)(a) >> 8)) |
#define | VAX_DBL_BIAS 0x81 |
#define | VAX_SNG_BIAS 0x81 |
Functions | |
void | ieee_double_to_local (const double *val, const int *n, int *errcode) |
void | ieee_float_to_local (const float *val, const int *n, int *errcode) |
static int | ieee_to_vax_float (float *fp) |
void | local_to_ieee_double (const double *val, const int *n, int *errcode) |
void | local_to_ieee_float (const float *val, const int *n, int *errcode) |
unsigned | local_to_vax_int (const fort_int *i) |
void | local_to_vax_ints (const fort_int *ia, const fort_int *n) |
unsigned short | local_to_vax_short (const unsigned short *s) |
void | local_to_vax_shorts (const unsigned short *sa, const int *n) |
void | local_to_vaxf (float *val, const int *n, int *errcode) |
static int | vax_to_ieee_float (float *fp) |
unsigned | vax_to_local_int (const fort_int *i) |
void | vax_to_local_ints (const fort_int *ia, const fort_int *n) |
unsigned short | vax_to_local_short (const unsigned short *s) |
void | vax_to_local_shorts (const unsigned short *sa, const int *n) |
void | vaxf_to_local (float *val, const int *n, int *errcode) |
Variables | |
static const struct sgl_limits_struct | sgl_limits [2] |
#define IEEE_DBL_BIAS 0x3ff |
Definition at line 240 of file vms_convert.cpp.
#define IEEE_SNG_BIAS 0x7f |
Definition at line 181 of file vms_convert.cpp.
#define IEEEFP 1 |
Definition at line 122 of file vms_convert.cpp.
#define MASK | ( | nbits | ) | ((1 << nbits) - 1) |
Definition at line 241 of file vms_convert.cpp.
#define maybe_flip_bytes | ( | __p, | |
__n | |||
) |
Definition at line 266 of file vms_convert.cpp.
#define mmax sgl_limits[0] |
Definition at line 194 of file vms_convert.cpp.
#define mmin sgl_limits[1] |
Definition at line 195 of file vms_convert.cpp.
#define swap_int | ( | a | ) | (((a) << 24) | (((a) << 8) & 0x00ff0000) | (((a) >> 8) & 0x0000ff00) | ((unsigned long)(a) >> 24)) |
Definition at line 33 of file vms_convert.cpp.
#define swap_short | ( | a | ) | (((a & 0xff) << 8) | ((unsigned short)(a) >> 8)) |
Definition at line 35 of file vms_convert.cpp.
#define VAX_DBL_BIAS 0x81 |
Definition at line 239 of file vms_convert.cpp.
#define VAX_SNG_BIAS 0x81 |
Definition at line 180 of file vms_convert.cpp.
void ieee_double_to_local | ( | const double * | val, |
const int * | n, | ||
int * | errcode | ||
) |
Definition at line 410 of file vms_convert.cpp.
References n.
void ieee_float_to_local | ( | const float * | val, |
const int * | n, | ||
int * | errcode | ||
) |
Definition at line 390 of file vms_convert.cpp.
References n.
|
static |
Definition at line 307 of file vms_convert.cpp.
References ieee_single::exp, vax_single::exp, IEEE_SNG_BIAS, ieee_single::mantissa, vax_single::mantissa1, vax_single::mantissa2, maybe_flip_bytes, mmax, mmin, ieee_single::sign, vax_single::sign, tmp, and VAX_SNG_BIAS.
Referenced by local_to_vaxf().
void local_to_ieee_double | ( | const double * | val, |
const int * | n, | ||
int * | errcode | ||
) |
Definition at line 452 of file vms_convert.cpp.
References n.
void local_to_ieee_float | ( | const float * | val, |
const int * | n, | ||
int * | errcode | ||
) |
Definition at line 431 of file vms_convert.cpp.
References n.
unsigned local_to_vax_int | ( | const fort_int * | i | ) |
Definition at line 55 of file vms_convert.cpp.
References swap_int.
Definition at line 93 of file vms_convert.cpp.
unsigned short local_to_vax_short | ( | const unsigned short * | s | ) |
Definition at line 39 of file vms_convert.cpp.
References swap_short.
void local_to_vax_shorts | ( | const unsigned short * | sa, |
const int * | n | ||
) |
Definition at line 71 of file vms_convert.cpp.
References n, and swap_short.
void local_to_vaxf | ( | float * | val, |
const int * | n, | ||
int * | errcode | ||
) |
Definition at line 375 of file vms_convert.cpp.
References ieee_to_vax_float(), and n.
Referenced by ISISRAW::ioRAW().
|
static |
Definition at line 270 of file vms_convert.cpp.
References ieee_single::exp, vax_single::exp, IEEE_SNG_BIAS, ieee_single::mantissa, vax_single::mantissa1, vax_single::mantissa2, maybe_flip_bytes, mmax, mmin, ieee_single::sign, vax_single::sign, and VAX_SNG_BIAS.
Referenced by vaxf_to_local().
unsigned vax_to_local_int | ( | const fort_int * | i | ) |
Definition at line 63 of file vms_convert.cpp.
References swap_int.
Definition at line 105 of file vms_convert.cpp.
unsigned short vax_to_local_short | ( | const unsigned short * | s | ) |
Definition at line 47 of file vms_convert.cpp.
References swap_short.
void vax_to_local_shorts | ( | const unsigned short * | sa, |
const int * | n | ||
) |
Definition at line 82 of file vms_convert.cpp.
References n, and swap_short.
void vaxf_to_local | ( | float * | val, |
const int * | n, | ||
int * | errcode | ||
) |
Definition at line 348 of file vms_convert.cpp.
References n, and vax_to_ieee_float().
Referenced by ISISRAW::ioRAW().
|
static |