Actual source code: f90_alpha.h
2: #if !defined (__F90_ALPHA_H)
4:
5: typedef struct {
6: long mult; /* stride in bytes */
7: long upper; /* ending index of the array */
8: long lower; /* starting index of the fortran array */
9: } tripple;
11: /*
12: The following constants are just
13: guesses. The program behavies strangly
14: if these constants are not set in
15: the f90 pointer
16: */
18: #define F90_INT_ID 3
19: #define F90_LONG_ID 4
20: #define F90_DOUBLE_ID 10
21: #define F90_COMPLEX_ID 13
22: #define F90_CHAR_ID 14
24: #if defined(PARCH_linux)
25: #define A_VAL 5
26: #else
27: #define A_VAL 1
28: #endif
30: #define B_VAL 10
32: #if !defined (PETSC_COMPLEX)
33: #define F90_SCALAR_ID F90_DOUBLE_ID
34: #else
35: #define F90_SCALAR_ID F90_COMPLEX_ID
36: #endif
39: #define f90_header() \
40: char ndim,a; /* No of dimensions, a=1 */ \
41: char id,b; /* char id representing the datatype, b=0 */ \
42: int c; /* c=0 */ \
43: long sd; /* sizeof(DataType) in bits */ \
44: void* addr; /* Pointer to the data */ \
45: long d; /* d=0 */ \
46: void* addr_d; /* addr-sumof(lower*mult) */
48: typedef struct {
49: f90_header()
50: tripple dim[1];
51: }F90Array1d;
53: typedef struct {
54: f90_header()
55: tripple dim[2]; /* dim1,dim2 */
56: }F90Array2d;
58: typedef struct {
59: f90_header()
60: tripple dim[3]; /* dim1,dim2,dim3 */
61: }F90Array3d;
63: typedef struct {
64: f90_header()
65: tripple dim[4]; /* dim1,dim2,dim3,dim4 */
66: }F90Array4d;
69: #endif