Actual source code: f90_absoft.h


  5: typedef struct {
  6:   long lower;   /* starting index of the fortran array */
  7:   long extent;  /* length of the array */
  8:   long mult;    /* multiple of 4 bytes (except for char)*/
  9: } tripple;
 10: 
 11: /* this might not be used in older version of compilers */
 12: #define F90_COOKIE     21
 13: #define F90_INT_ID     131074
 14: #define F90_DOUBLE_ID  134480899
 15: #define F90_COMPLEX_ID 268960772
 16: #define F90_CHAR_ID    32774

 18: #define F90_LONG_ID F90_INT_ID

 20: #if !defined (PETSC_COMPLEX)
 21: #define F90_SCALAR_ID F90_DOUBLE_ID
 22: #else
 23: #define F90_SCALAR_ID F90_COMPLEX_ID
 24: #endif

 26: #define f90_header() \
 27: void* addr;      /* Pointer to the data/array */ \
 28: int   sd;        /* sizeof(DataType) in bits */  \
 29: short cookie;    \
 30: short dim_id;    /* No of dimentions */          \
 31: int   id;        /* ID corresponding to datatype */ \
 32: int   a,b;

 34: typedef struct {
 35:   f90_header()
 36:   tripple dim[1];
 37: }F90Array1d;

 39: typedef struct {
 40:   f90_header()
 41:   tripple dim[2];
 42: }F90Array2d;

 44: typedef struct {
 45:   f90_header()
 46:   tripple dim[3];
 47: }F90Array3d;

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

 54: #endif