OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
imsl_wrap.h
Go to the documentation of this file.
1 #ifdef NOIMSL
2 #ifndef IMSL_H
3 /*
4 !C-INC*************************************************************************
5 !Description:
6  This header allows us to use reverse-engineered substitutes for the
7  IMSL library functions, when running on platforms where that library is
8  unavailable, while using the actual functions when they are available.
9 
10 !Input Parameters:
11  None
12 
13 !Output Parameters:
14  None
15 
16 Return Value:
17  None
18 
19 Externally Defined:
20  _WIN32 Defined by the compiler, on 32-bit Windows platforms.
21 
22 Called by:
23  None
24 
25 Routines Called:
26  None
27 
28 !Revision History:
29 $Log: imsl_wrap.h,v $
30 Revision 4.5 2003/08/28 16:06:39 kuyper
31 Corrected prolog.
32 
33 Revision 4.4 2003/07/30 20:07:52 kuyper
34 Corrected value for IMSL_NEGATIVE_ORDER.
35 
36 Revision 4.3 2003/07/25 19:24:31 kuyper
37 Changed error code used for bad spline derivatives.
38 Added code for xvec not increasing.
39 
40 Revision 4.2 2003/05/21 19:15:41 kuyper
41 Added code values and option values needed by imsl_d_spline_interp() and
42 imsl_d_lin_sol_gen().
43 
44 Revision 4.1 2002/11/06 23:52:28 kuyper
45 Copied select portions from the IMSL header files.
46 
47 James Kuyper Jr. kuyper@saicmodis.com
48 
49 Requirements:
50  None
51 
52 !Team-unique Header:
53  This software is developed by the MODIS Science Data Support
54  Team for the National Aeronautics and Space Administration,
55  Goddard Space Flight Center, under contract NAS5-32373.
56 
57 References and Credits:
58  "IMSL C/Math/Library", copyright 1990-2001 Visual Numerics, Inc.
59  Copied from the imsl.h and imslerr.h header files, with modifications.
60 
61 !END***************************************************************************
62 */
63  #define IMSL_H
64 
65  #ifdef _WIN32
66  #define IMSL_DECL __cdecl
67  #else
68  #define IMSL_DECL
69  #endif
70 
71  typedef enum {
72  IMSL_UNKNOWN_OPTION = 103,
73  IMSL_OPTIONAL_ARG_NULL_1 = 104,
74  IMSL_INTEGER_OUT_OF_RANGE = 132,
75  IMSL_UNEXPECTED_NULL_POINTER = 150,
76  IMSL_OUT_OF_MEMORY = 200,
77  IMSL_OUT_OF_MEMORY_2 = 202,
78  IMSL_ILL_CONDITIONED = 1003,
79  IMSL_SINGULAR_MATRIX = 1004,
80  IMSL_NEGATIVE_ORDER = 1010,
81  IMSL_XDATA_NOT_INCREASING = 3024,
82  IMSL_KNOT_MULTIPLICITY = 3028,
83  IMSL_KNOT_NOT_INCREASING = 3029,
84  IMSL_SPLINE_BAD_ORDER = 3031,
85  IMSL_SPLINE_BAD_COEFFS = 3032,
86  IMSL_SPLINE_ORDER_DERIV = 3033,
87  IMSL_DUPLICATE_XDATA_VALUES = 3034,
88  IMSL_SPLINE_NEED_DATA_PTS = 3035,
89  IMSL_XDATA_TOO_LARGE = 3052,
90  IMSL_XDATA_TOO_SMALL = 3053,
91  IMSL_KNOT_DATA_INTERLACING = 3101,
92  IMSL_XVEC_NOT_INCREASING = 3122,
93  IMSL_XVEC_LENGTH = 3123
94  } Imsl_code;
95 
96  typedef enum {
97  IMSL_WARNING = 3,
98  IMSL_FATAL = 4,
99  IMSL_TERMINAL = 5
100  } Imsl_error;
101 
102  typedef struct {
103  int domain_dim;
104  int target_dim;
105  int *order;
106  int *num_coef;
107  int *num_knots;
108  double **knots;
109  double **coef;
110  } Imsl_d_spline;
111 
112  double * IMSL_DECL imsl_d_lin_sol_gen(int, double*, double*, ...);
113  Imsl_d_spline * IMSL_DECL
114  imsl_d_spline_interp(int, double[], double[], ...);
115  double IMSL_DECL imsl_d_spline_value(double, Imsl_d_spline*, ...);
116 
117 #if defined(__alpha) && defined(__osf__)
118  int
119 #else
120  long
121 #endif
122  IMSL_DECL imsl_error_code(void);
123 
124  void IMSL_DECL imsl_error_options (int, ...);
125  double IMSL_DECL imsl_d_machine(int);
126 
127  enum Imsl_keyword {
128  IMSL_DERIV = 10028,
129  IMSL_KNOTS = 10035,
130  IMSL_ORDER = 10036,
131  IMSL_INVERSE = 10152,
132  IMSL_INVERSE_USER = 10153,
133  IMSL_INVERSE_ONLY = 10155,
134  IMSL_SET_PRINT = 10188,
135  IMSL_SET_STOP = 10190,
136  IMSL_GRID_USER = 11051
137  };
138  #endif /* IMSL_H */
139 
140 #else
141 
142  #include "imsl.h"
143 
144 #endif /* NOIMSL */
145 
double IMSL_DECL imsl_d_machine(int n)
double *IMSL_DECL imsl_d_lin_sol_gen(int const dim, double matrix[], double not_used[],...)
double IMSL_DECL imsl_d_spline_value(double x, Imsl_d_spline *sp,...)
long IMSL_DECL imsl_error_code(void)
Definition: imsl_error.c:27
Imsl_d_spline *IMSL_DECL imsl_d_spline_interp(int ndata, double xdata[], double fdata[],...)
void IMSL_DECL imsl_error_options(int arg,...)
Definition: imsl_error.c:81