Mantid
Loading...
Searching...
No Matches
vms_convert.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9// We aren't going to EVER change this code - so let's ignore the warnings.
10#if defined(__GNUC__) && !(defined(__INTEL_COMPILER))
11#pragma GCC diagnostic ignored "-Wconversion"
12#pragma GCC diagnostic ignored "-Wstrict-aliasing"
13#elif defined(_WIN32)
14#pragma warning(disable : 4100)
15#endif
16
17using fort_int = int;
18
19unsigned short local_to_vax_short(const unsigned short *s);
20unsigned short vax_to_local_short(const unsigned short *s);
21unsigned local_to_vax_int(const fort_int *i);
22unsigned vax_to_local_int(const fort_int *i);
23
24void local_to_vax_shorts(const unsigned short *sa, const int *n);
25void vax_to_local_shorts(const unsigned short *sa, const int *n);
26void local_to_vax_ints(const fort_int *ia, const fort_int *n);
27void vax_to_local_ints(const fort_int *ia, const fort_int *n);
28
29/* these routines return 0 = success, 1 = failure */
30
31/* convert an IEEE single float to VAX F FLOAT format */
32/* int ieee_to_vax_float(float* fp); */
33
34/* convert VAX F FLOAT into an IEEE single float */
35/* int vax_to_ieee_float(float* fp); */
36
37/* convert float array val[n] to and from vax float */
38void vaxf_to_local(float *val, const int *n, int *errcode);
39void local_to_vaxf(float *val, const int *n, int *errcode);
40void local_to_ieee_float(const float *val, const int *n, int *errcode);
41void local_to_ieee_double(const double *val, const int *n, int *errcode);
42void ieee_float_to_local(const float *val, const int *n, int *errcode);
43void ieee_double_to_local(const double *val, const int *n, int *errcode);
void local_to_vax_ints(const fort_int *ia, const fort_int *n)
Definition: vms_convert.cpp:93
void vax_to_local_ints(const fort_int *ia, const fort_int *n)
void ieee_float_to_local(const float *val, const int *n, int *errcode)
void vaxf_to_local(float *val, const int *n, int *errcode)
void local_to_vaxf(float *val, const int *n, int *errcode)
void ieee_double_to_local(const double *val, const int *n, int *errcode)
unsigned local_to_vax_int(const fort_int *i)
Definition: vms_convert.cpp:55
void local_to_ieee_double(const double *val, const int *n, int *errcode)
void local_to_vax_shorts(const unsigned short *sa, const int *n)
Definition: vms_convert.cpp:71
int fort_int
Definition: vms_convert.h:17
unsigned short vax_to_local_short(const unsigned short *s)
Definition: vms_convert.cpp:47
void vax_to_local_shorts(const unsigned short *sa, const int *n)
Definition: vms_convert.cpp:82
unsigned vax_to_local_int(const fort_int *i)
Definition: vms_convert.cpp:63
unsigned short local_to_vax_short(const unsigned short *s)
Definition: vms_convert.cpp:39
void local_to_ieee_float(const float *val, const int *n, int *errcode)