Actual source code: f90impl.h
1: #pragma once
2: #include <petsc/private/fortranimpl.h>
4: /* PGI compilers pass in f90 pointers as 2 arguments */
5: #if defined(PETSC_HAVE_F90_2PTR_ARG)
6: #define PETSC_F90_2PTR_PROTO_NOVAR , void *
7: #define PETSC_F90_2PTR_PROTO(ptr) , void *ptr
8: #define PETSC_F90_2PTR_PARAM(ptr) , ptr
9: #else
10: #define PETSC_F90_2PTR_PROTO_NOVAR
11: #define PETSC_F90_2PTR_PROTO(ptr)
12: #define PETSC_F90_2PTR_PARAM(ptr)
13: #endif
15: typedef struct {
16: char dummy;
17: } F90Array1d;
18: typedef struct {
19: char dummy;
20: } F90Array2d;
21: typedef struct {
22: char dummy;
23: } F90Array3d;
24: typedef struct {
25: char dummy;
26: } F90Array4d;
28: PETSC_EXTERN PetscErrorCode F90Array1dCreate(void *, MPI_Datatype, PetscInt, PetscInt, F90Array1d *PETSC_F90_2PTR_PROTO_NOVAR);
29: PETSC_EXTERN PetscErrorCode F90Array1dAccess(F90Array1d *, MPI_Datatype, void **PETSC_F90_2PTR_PROTO_NOVAR);
30: PETSC_EXTERN PetscErrorCode F90Array1dDestroy(F90Array1d *, MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
32: PETSC_EXTERN PetscErrorCode F90Array2dCreate(void *, MPI_Datatype, PetscInt, PetscInt, PetscInt, PetscInt, F90Array2d *PETSC_F90_2PTR_PROTO_NOVAR);
33: PETSC_EXTERN PetscErrorCode F90Array2dAccess(F90Array2d *, MPI_Datatype, void **PETSC_F90_2PTR_PROTO_NOVAR);
34: PETSC_EXTERN PetscErrorCode F90Array2dDestroy(F90Array2d *, MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
36: PETSC_EXTERN PetscErrorCode F90Array3dCreate(void *, MPI_Datatype, PetscInt, PetscInt, PetscInt, PetscInt, PetscInt, PetscInt, F90Array3d *PETSC_F90_2PTR_PROTO_NOVAR);
37: PETSC_EXTERN PetscErrorCode F90Array3dAccess(F90Array3d *, MPI_Datatype, void **PETSC_F90_2PTR_PROTO_NOVAR);
38: PETSC_EXTERN PetscErrorCode F90Array3dDestroy(F90Array3d *, MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
40: PETSC_EXTERN PetscErrorCode F90Array4dCreate(void *, MPI_Datatype, PetscInt, PetscInt, PetscInt, PetscInt, PetscInt, PetscInt, PetscInt, PetscInt, F90Array4d *PETSC_F90_2PTR_PROTO_NOVAR);
41: PETSC_EXTERN PetscErrorCode F90Array4dAccess(F90Array4d *, MPI_Datatype, void **PETSC_F90_2PTR_PROTO_NOVAR);
42: PETSC_EXTERN PetscErrorCode F90Array4dDestroy(F90Array4d *, MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
44: /*
45: F90Array1dCreate - Given a C pointer to a one dimensional
46: array and its length; this fills in the appropriate Fortran 90
47: pointer data structure.
49: Input Parameters:
50: + array - regular C pointer (address)
51: . type - DataType of the array
52: . start - starting index of the array
53: - len - length of array (in items)
55: Output Parameter:
56: . ptr - Fortran 90 pointer
57: */