summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2008-01-17 18:50:14 +0000
committerAlberto Ruiz <aruiz@um.es>2008-01-17 18:50:14 +0000
commitd4c8878eb2e6114fd483e1225f060dfec1fc100c (patch)
tree22242f8581a0624fc178185fc46e7575c81af1f3 /lib
parent0d26c1fc0eccdeb585a74d96cbe7861cf20c7bd2 (diff)
removed f2c.h
Diffstat (limited to 'lib')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/f2c.h284
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h41
2 files changed, 40 insertions, 285 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/f2c.h b/lib/Numeric/LinearAlgebra/LAPACK/f2c.h
deleted file mode 100644
index 6a07e09..0000000
--- a/lib/Numeric/LinearAlgebra/LAPACK/f2c.h
+++ /dev/null
@@ -1,284 +0,0 @@
1/* f2c.h -- Standard Fortran to C header file */
2
3/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
4
5 - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
6
7#ifndef F2C_INCLUDE
8#define F2C_INCLUDE
9
10/*
11
12Extracted from http://opengrok.creo.hu/dragonfly/xref/src/contrib/gcc-3.4/libf2c/readme.netlib
13
14NOTE: f2c.h defines several types, e.g., real, integer, doublereal.
15 115 The definitions in f2c.h are suitable for most machines, but if
16 116 your machine has sizeof(double) > 2*sizeof(long), you may need
17 117 to adjust f2c.h appropriately. f2c assumes
18 118 sizeof(doublecomplex) = 2*sizeof(doublereal)
19 119 sizeof(doublereal) = sizeof(complex)
20 120 sizeof(doublereal) = 2*sizeof(real)
21 121 sizeof(real) = sizeof(integer)
22 122 sizeof(real) = sizeof(logical)
23 123 sizeof(real) = 2*sizeof(shortint)
24 124 EQUIVALENCEs may not be translated correctly if these
25 125 assumptions are violated.
26 126
27 127 On machines, such as those using a DEC Alpha processor, on
28 128 which sizeof(short) == 2, sizeof(int) == sizeof(float) == 4,
29 129 and sizeof(long) == sizeof(double) == 8, it suffices to
30 130 modify f2c.h by removing the first occurrence of "long "
31 131 on each line containing "long ", e.g., by issuing the
32 132 commands
33 133 mv f2c.h f2c.h0
34 134 sed 's/long //' f2c.h0 >f2c.h
35 135 On such machines, one can enable INTEGER*8 by uncommenting
36 136 the typedef of longint in f2c.h, so it reads
37 137 typedef long longint;
38 138 by compiling libI77 with -DAllow_TYQUAD, and by adjusting
39 139 libF77/makefile as described in libF77/README.
40 140
41 141 Some machines may have sizeof(int) == 4, sizeof(float) == 8,
42 142 and sizeof(long long) == 8. On such machines, adjust f2c.h
43 143 by changing "long int " to "long long ", e.g., by saying
44 144 mv f2c.h f2c.h0
45 145 sed 's/long int /long long /' f2c.h0 >f2c.h
46 146 One can enable INTEGER*8 on such machines as described
47 147 above, but with
48 148 typedef long long longint;
49
50I thing that the following definitions are correct:
51
52*/
53
54#ifdef _LP64
55typedef int integer;
56typedef unsigned int uinteger;
57typedef int logical;
58typedef long longint; /* system-dependent */
59typedef unsigned long ulongint; /* system-dependent */
60#else
61typedef long int integer;
62typedef unsigned long int uinteger;
63typedef long int logical;
64typedef long long longint; /* system-dependent */
65typedef unsigned long long ulongint; /* system-dependent */
66#endif
67
68typedef char *address;
69typedef short int shortint;
70typedef float real;
71typedef double doublereal;
72typedef struct { real r, i; } complex;
73typedef struct { doublereal r, i; } doublecomplex;
74typedef short int shortlogical;
75typedef char logical1;
76typedef char integer1;
77#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
78#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
79#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
80#endif
81
82#define TRUE_ (1)
83#define FALSE_ (0)
84
85/* Extern is for use with -E */
86#ifndef Extern
87#define Extern extern
88#endif
89
90/* I/O stuff */
91
92#ifdef f2c_i2
93/* for -i2 */
94typedef short flag;
95typedef short ftnlen;
96typedef short ftnint;
97#else
98
99#ifdef _LP64
100typedef int flag;
101typedef int ftnlen;
102typedef int ftnint;
103#else
104typedef long int flag;
105typedef long int ftnlen;
106typedef long int ftnint;
107#endif
108
109#endif
110
111/*external read, write*/
112typedef struct
113{ flag cierr;
114 ftnint ciunit;
115 flag ciend;
116 char *cifmt;
117 ftnint cirec;
118} cilist;
119
120/*internal read, write*/
121typedef struct
122{ flag icierr;
123 char *iciunit;
124 flag iciend;
125 char *icifmt;
126 ftnint icirlen;
127 ftnint icirnum;
128} icilist;
129
130/*open*/
131typedef struct
132{ flag oerr;
133 ftnint ounit;
134 char *ofnm;
135 ftnlen ofnmlen;
136 char *osta;
137 char *oacc;
138 char *ofm;
139 ftnint orl;
140 char *oblnk;
141} olist;
142
143/*close*/
144typedef struct
145{ flag cerr;
146 ftnint cunit;
147 char *csta;
148} cllist;
149
150/*rewind, backspace, endfile*/
151typedef struct
152{ flag aerr;
153 ftnint aunit;
154} alist;
155
156/* inquire */
157typedef struct
158{ flag inerr;
159 ftnint inunit;
160 char *infile;
161 ftnlen infilen;
162 ftnint *inex; /*parameters in standard's order*/
163 ftnint *inopen;
164 ftnint *innum;
165 ftnint *innamed;
166 char *inname;
167 ftnlen innamlen;
168 char *inacc;
169 ftnlen inacclen;
170 char *inseq;
171 ftnlen inseqlen;
172 char *indir;
173 ftnlen indirlen;
174 char *infmt;
175 ftnlen infmtlen;
176 char *inform;
177 ftnint informlen;
178 char *inunf;
179 ftnlen inunflen;
180 ftnint *inrecl;
181 ftnint *innrec;
182 char *inblank;
183 ftnlen inblanklen;
184} inlist;
185
186#define VOID void
187
188union Multitype { /* for multiple entry points */
189 integer1 g;
190 shortint h;
191 integer i;
192 /* longint j; */
193 real r;
194 doublereal d;
195 complex c;
196 doublecomplex z;
197 };
198
199typedef union Multitype Multitype;
200
201/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
202
203struct Vardesc { /* for Namelist */
204 char *name;
205 char *addr;
206 ftnlen *dims;
207 int type;
208 };
209typedef struct Vardesc Vardesc;
210
211struct Namelist {
212 char *name;
213 Vardesc **vars;
214 int nvars;
215 };
216typedef struct Namelist Namelist;
217
218#define abs(x) ((x) >= 0 ? (x) : -(x))
219#define dabs(x) (doublereal)abs(x)
220#define min(a,b) ((a) <= (b) ? (a) : (b))
221#define max(a,b) ((a) >= (b) ? (a) : (b))
222#define dmin(a,b) (doublereal)min(a,b)
223#define dmax(a,b) (doublereal)max(a,b)
224#define bit_test(a,b) ((a) >> (b) & 1)
225#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
226#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
227
228/* procedure parameter types for -A and -C++ */
229
230#define F2C_proc_par_types 1
231#ifdef __cplusplus
232typedef int /* Unknown procedure type */ (*U_fp)(...);
233typedef shortint (*J_fp)(...);
234typedef integer (*I_fp)(...);
235typedef real (*R_fp)(...);
236typedef doublereal (*D_fp)(...), (*E_fp)(...);
237typedef /* Complex */ VOID (*C_fp)(...);
238typedef /* Double Complex */ VOID (*Z_fp)(...);
239typedef logical (*L_fp)(...);
240typedef shortlogical (*K_fp)(...);
241typedef /* Character */ VOID (*H_fp)(...);
242typedef /* Subroutine */ int (*S_fp)(...);
243#else
244typedef int /* Unknown procedure type */ (*U_fp)();
245typedef shortint (*J_fp)();
246typedef integer (*I_fp)();
247typedef real (*R_fp)();
248typedef doublereal (*D_fp)(), (*E_fp)();
249typedef /* Complex */ VOID (*C_fp)();
250typedef /* Double Complex */ VOID (*Z_fp)();
251typedef logical (*L_fp)();
252typedef shortlogical (*K_fp)();
253typedef /* Character */ VOID (*H_fp)();
254typedef /* Subroutine */ int (*S_fp)();
255#endif
256/* E_fp is for real functions when -R is not specified */
257typedef VOID C_f; /* complex function */
258typedef VOID H_f; /* character function */
259typedef VOID Z_f; /* double complex function */
260typedef doublereal E_f; /* real function with -R not specified */
261
262/* undef any lower-case symbols that your C compiler predefines, e.g.: */
263
264#ifndef Skip_f2c_Undefs
265#undef cray
266#undef gcos
267#undef mc68010
268#undef mc68020
269#undef mips
270#undef pdp11
271#undef sgi
272#undef sparc
273#undef sun
274#undef sun2
275#undef sun3
276#undef sun4
277#undef u370
278#undef u3b
279#undef u3b2
280#undef u3b5
281#undef unix
282#undef vax
283#endif
284#endif
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
index bccd4b8..79e52be 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
@@ -1,6 +1,45 @@
1#include "f2c.h" 1/*
2 * We have copied the definitions in f2c.h required
3 * to compile clapack.h, modified to support both
4 * 32 and 64 bit
5
6 http://opengrok.creo.hu/dragonfly/xref/src/contrib/gcc-3.4/libf2c/readme.netlib
7 http://www.ibm.com/developerworks/library/l-port64.html
8 */
9
10#ifdef _LP64
11typedef int integer;
12typedef unsigned int uinteger;
13typedef int logical;
14typedef long longint; /* system-dependent */
15typedef unsigned long ulongint; /* system-dependent */
16#else
17typedef long int integer;
18typedef unsigned long int uinteger;
19typedef long int logical;
20typedef long long longint; /* system-dependent */
21typedef unsigned long long ulongint; /* system-dependent */
22#endif
23
24typedef char *address;
25typedef short int shortint;
26typedef float real;
27typedef double doublereal;
28typedef struct { real r, i; } complex;
29typedef struct { doublereal r, i; } doublecomplex;
30typedef short int shortlogical;
31typedef char logical1;
32typedef char integer1;
33
34typedef logical (*L_fp)();
35typedef short ftnlen;
36
37/********************************************************/
38
2#include "clapack.h" 39#include "clapack.h"
3 40
41/********************************************************/
42
4#define DVEC(A) int A##n, double*A##p 43#define DVEC(A) int A##n, double*A##p
5#define CVEC(A) int A##n, double*A##p 44#define CVEC(A) int A##n, double*A##p
6#define DMAT(A) int A##r, int A##c, double* A##p 45#define DMAT(A) int A##r, int A##c, double* A##p