Actual source code: f90_hpux.c

      2: /*-------------------------------------------------------------*/

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

     14:   PetscDataTypeGetSize(type,&size);
     15:   ptr->addr          = array;
     16:   ptr->cookie        = F90_COOKIE;
     17:   ptr->sd            = size;
     18:   ptr->ndim          = F90_1D_ID;
     19:   ptr->dim[0].extent = len;
     20:   ptr->dim[0].mult   = size;
     21:   ptr->dim[0].lower  = start;
     22:   return(0);
     23: }

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

     35:   PetscDataTypeGetSize(type,&size);
     36:   ptr->addr          = array;
     37:   ptr->cookie        = F90_COOKIE;
     38:   ptr->sd            = size;
     39:   ptr->ndim          = F90_2D_ID;
     40:   ptr->dim[0].extent = len1;
     41:   ptr->dim[0].mult   = size;
     42:   ptr->dim[0].lower  = start1;
     43:   ptr->dim[1].extent = len2;
     44:   ptr->dim[1].mult   = len1*size;
     45:   ptr->dim[1].lower  = start2;
     46:   return(0);
     47: }
     48: /*-------------------------------------------------------------*/