Actual source code: f90_alpha.h

  1: /* $Id: f90_alpha.h,v 1.5 2000/09/22 18:54:10 balay Exp $ */

  3: #if !defined (__F90_ALPHA_H)
  5: 
  6: typedef struct {
  7:   long mult;    /* stride in bytes */
  8:   long upper;   /* ending index of the array */
  9:   long lower;   /* starting index of the fortran array */
 10: } tripple;

 12: /*
 13:   The following constants are just
 14:   guesses. The program behavies strangly
 15:   if these constants are not set in
 16:   the f90 pointer
 17: */

 19: #define F90_INT_ID     3
 20: #define F90_LONG_ID    4
 21: #define F90_DOUBLE_ID  10
 22: #define F90_COMPLEX_ID 13
 23: #define F90_CHAR_ID    14

 25: #if defined(PARCH_linux)
 26: #define A_VAL 5
 27: #else
 28: #define A_VAL 1
 29: #endif

 31: #define B_VAL 10

 33: #if !defined (PETSC_COMPLEX)
 34: #define F90_SCALAR_ID F90_DOUBLE_ID
 35: #else
 36: #define F90_SCALAR_ID F90_COMPLEX_ID
 37: #endif


 40: #define f90_header() 
 41: char           ndim,a;  /* No of dimensions, a=1 */ 
 42: char           id,b;    /* char id representing the datatype, b=0 */ 
 43: int            c;       /* c=0 */ 
 44: long           sd;      /* sizeof(DataType) in bits */  
 45: void*          addr;    /* Pointer to the data */ 
 46: long           d;       /* d=0 */ 
 47: void*          addr_d;  /* addr-sumof(lower*mult) */

 49: typedef struct {
 50:   f90_header()
 51:   tripple dim[1];
 52: }F90Array1d;

 54: typedef struct {
 55:   f90_header()
 56:   tripple dim[2];   /* dim1,dim2 */
 57: }F90Array2d;

 59: typedef struct {
 60:   f90_header()
 61:   tripple dim[3];   /* dim1,dim2,dim3 */
 62: }F90Array3d;

 64: typedef struct {
 65:   f90_header()
 66:   tripple dim[4];   /* dim1,dim2,dim3,dim4 */
 67: }F90Array4d;


 70: #endif