Mantid
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
vms_convert.cpp File Reference
#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]
 

Macro Definition Documentation

◆ IEEE_DBL_BIAS

#define IEEE_DBL_BIAS   0x3ff

Definition at line 240 of file vms_convert.cpp.

◆ IEEE_SNG_BIAS

#define IEEE_SNG_BIAS   0x7f

Definition at line 181 of file vms_convert.cpp.

◆ IEEEFP

#define IEEEFP   1

Definition at line 122 of file vms_convert.cpp.

◆ MASK

#define MASK (   nbits)    ((1 << nbits) - 1)

Definition at line 241 of file vms_convert.cpp.

◆ maybe_flip_bytes

#define maybe_flip_bytes (   __p,
  __n 
)

Definition at line 266 of file vms_convert.cpp.

◆ mmax

#define mmax   sgl_limits[0]

Definition at line 194 of file vms_convert.cpp.

◆ mmin

#define mmin   sgl_limits[1]

Definition at line 195 of file vms_convert.cpp.

◆ swap_int

#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.

◆ swap_short

#define swap_short (   a)    (((a & 0xff) << 8) | ((unsigned short)(a) >> 8))

Definition at line 35 of file vms_convert.cpp.

◆ VAX_DBL_BIAS

#define VAX_DBL_BIAS   0x81

Definition at line 239 of file vms_convert.cpp.

◆ VAX_SNG_BIAS

#define VAX_SNG_BIAS   0x81

Definition at line 180 of file vms_convert.cpp.

Function Documentation

◆ ieee_double_to_local()

void ieee_double_to_local ( const double *  val,
const int *  n,
int *  errcode 
)

Definition at line 410 of file vms_convert.cpp.

References n.

◆ ieee_float_to_local()

void ieee_float_to_local ( const float *  val,
const int *  n,
int *  errcode 
)

Definition at line 390 of file vms_convert.cpp.

References n.

◆ ieee_to_vax_float()

static int ieee_to_vax_float ( float *  fp)
static

◆ local_to_ieee_double()

void local_to_ieee_double ( const double *  val,
const int *  n,
int *  errcode 
)

Definition at line 452 of file vms_convert.cpp.

References n.

◆ local_to_ieee_float()

void local_to_ieee_float ( const float *  val,
const int *  n,
int *  errcode 
)

Definition at line 431 of file vms_convert.cpp.

References n.

◆ local_to_vax_int()

unsigned local_to_vax_int ( const fort_int i)

Definition at line 55 of file vms_convert.cpp.

References swap_int.

◆ local_to_vax_ints()

void local_to_vax_ints ( const fort_int ia,
const fort_int n 
)

Definition at line 93 of file vms_convert.cpp.

References n, and swap_int.

◆ local_to_vax_short()

unsigned short local_to_vax_short ( const unsigned short *  s)

Definition at line 39 of file vms_convert.cpp.

References swap_short.

◆ local_to_vax_shorts()

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.

◆ local_to_vaxf()

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().

◆ vax_to_ieee_float()

static int vax_to_ieee_float ( float *  fp)
static

◆ vax_to_local_int()

unsigned vax_to_local_int ( const fort_int i)

Definition at line 63 of file vms_convert.cpp.

References swap_int.

◆ vax_to_local_ints()

void vax_to_local_ints ( const fort_int ia,
const fort_int n 
)

Definition at line 105 of file vms_convert.cpp.

References n, and swap_int.

◆ vax_to_local_short()

unsigned short vax_to_local_short ( const unsigned short *  s)

Definition at line 47 of file vms_convert.cpp.

References swap_short.

◆ vax_to_local_shorts()

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.

◆ vaxf_to_local()

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().

Variable Documentation

◆ sgl_limits

const struct sgl_limits_struct sgl_limits[2]
static
Initial value:
= {
{{0x7f, 0xff, 0x0, 0xffff},
{0x0, 0xff, 0x0}},
{{0x0, 0x0, 0x0, 0x0},
{0x0, 0x0, 0x0}}
}