Actual source code: f90_intel8.c

      1: #define PETSC_DLL

      3: /*-------------------------------------------------------------*/

      7: PetscErrorCode PETSC_DLLEXPORT F90Array1dCreate(void *array,PetscDataType type,PetscInt start,PetscInt len,F90Array1d *ptr)
      8: {
     10:   PetscInt size;

     15:   PetscDataTypeGetSize(type,&size);
     16:   ptr->addr          = array;
     17:   ptr->sd            = size;
     18:   ptr->ndim          = 1;
     19:   ptr->a             = F90_COOKIE7;
     20:   ptr->b             = F90_COOKIE0;
     21:   ptr->dim[0].extent = len;
     22:   ptr->dim[0].mult   = size;
     23:   ptr->dim[0].lower  = start;
     24:   ptr->sum_d         = -(ptr->dim[0].lower*ptr->dim[0].mult);
     25:   return(0);
     26: }

     30: PetscErrorCode PETSC_DLLEXPORT F90Array2dCreate(void *array,PetscDataType type,PetscInt start1,PetscInt len1,PetscInt start2,PetscInt len2,F90Array2d *ptr)
     31: {
     33:   PetscInt size;

     38:   PetscDataTypeGetSize(type,&size);
     39:   ptr->addr          = array;
     40:   ptr->sd            = size;
     41:   ptr->ndim          = 2;
     42:   ptr->a             = F90_COOKIE7;
     43:   ptr->b             = F90_COOKIE0;
     44:   ptr->dim[0].extent = len1;
     45:   ptr->dim[0].mult   = size;
     46:   ptr->dim[0].lower  = start1;
     47:   ptr->dim[1].extent = len2;
     48:   ptr->dim[1].mult   = len1*size;
     49:   ptr->dim[1].lower  = start2;
     50:   ptr->sum_d         = -(ptr->dim[0].lower*ptr->dim[0].mult+ptr->dim[1].lower*ptr->dim[1].mult);
     51:   return(0);
     52: }
     53: /*-------------------------------------------------------------*/