Actual source code: f90impl.h
petsc-3.6.1 2015-08-06
4: #include <petsc/private/fortranimpl.h>
6: /* PGI compilers pass in f90 pointers as 2 arguments */
7: #if defined(PETSC_HAVE_F90_2PTR_ARG)
8: #define PETSC_F90_2PTR_PROTO_NOVAR ,void*
9: #define PETSC_F90_2PTR_PROTO(ptr) ,void* ptr
10: #define PETSC_F90_2PTR_PARAM(ptr) , ptr
11: #else
12: #define PETSC_F90_2PTR_PROTO_NOVAR
13: #define PETSC_F90_2PTR_PROTO(ptr)
14: #define PETSC_F90_2PTR_PARAM(ptr)
15: #endif
17: #if defined(PETSC_USING_F90)
19: #define F90Array1d void
20: #define F90Array2d void
21: #define F90Array3d void
22: #define F90Array4d void
24: PETSC_EXTERN PetscErrorCode F90Array1dCreate(void*,PetscDataType,PetscInt,PetscInt,F90Array1d* PETSC_F90_2PTR_PROTO_NOVAR);
25: PETSC_EXTERN PetscErrorCode F90Array1dAccess(F90Array1d*,PetscDataType,void** PETSC_F90_2PTR_PROTO_NOVAR);
26: PETSC_EXTERN PetscErrorCode F90Array1dDestroy(F90Array1d*,PetscDataType PETSC_F90_2PTR_PROTO_NOVAR);
27: PETSC_EXTERN PetscErrorCode F90Array1dGetNextRecord(F90Array1d*,void** PETSC_F90_2PTR_PROTO_NOVAR);
29: PETSC_EXTERN PetscErrorCode F90Array2dCreate(void*,PetscDataType,PetscInt,PetscInt,PetscInt,PetscInt,F90Array2d* PETSC_F90_2PTR_PROTO_NOVAR);
30: PETSC_EXTERN PetscErrorCode F90Array2dAccess(F90Array2d*,PetscDataType,void** PETSC_F90_2PTR_PROTO_NOVAR);
31: PETSC_EXTERN PetscErrorCode F90Array2dDestroy(F90Array2d*,PetscDataType PETSC_F90_2PTR_PROTO_NOVAR);
32: PETSC_EXTERN PetscErrorCode F90Array2dGetNextRecord(F90Array2d*,void** PETSC_F90_2PTR_PROTO_NOVAR);
34: PETSC_EXTERN PetscErrorCode F90Array3dCreate(void*,PetscDataType,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,F90Array3d* PETSC_F90_2PTR_PROTO_NOVAR);
35: PETSC_EXTERN PetscErrorCode F90Array3dAccess(F90Array3d*,PetscDataType,void** PETSC_F90_2PTR_PROTO_NOVAR);
36: PETSC_EXTERN PetscErrorCode F90Array3dDestroy(F90Array3d*,PetscDataType PETSC_F90_2PTR_PROTO_NOVAR);
37: PETSC_EXTERN PetscErrorCode F90Array3dGetNextRecord(F90Array3d*,void** PETSC_F90_2PTR_PROTO_NOVAR);
39: PETSC_EXTERN PetscErrorCode F90Array4dCreate(void*,PetscDataType,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,F90Array4d* PETSC_F90_2PTR_PROTO_NOVAR);
40: PETSC_EXTERN PetscErrorCode F90Array4dAccess(F90Array4d*,PetscDataType,void** PETSC_F90_2PTR_PROTO_NOVAR);
41: PETSC_EXTERN PetscErrorCode F90Array4dDestroy(F90Array4d*,PetscDataType PETSC_F90_2PTR_PROTO_NOVAR);
42: PETSC_EXTERN PetscErrorCode F90Array4dGetNextRecord(F90Array4d*,void** PETSC_F90_2PTR_PROTO_NOVAR);
44: /*
45: PETSC_EXTERN PetscErrorCode F90Array1dGetInfo(F90Array1d*,PetscDataType*,int*,int*);
46: PETSC_EXTERN PetscErrorCode F90Array2dGetInfo(F90Array2d*,PetscDataType*,int*,int*,int*,int*);
47: */
49: /*
50: F90Array1dCreate - Given a C pointer to a one dimensional
51: array and its length; this fills in the appropriate Fortran 90
52: pointer data structure.
54: Input Parameters:
55: + array - regular C pointer (address)
56: . type - DataType of the array
57: . start - starting index of the array
58: - len - length of array (in items)
60: Output Parameters:
61: . ptr - Fortran 90 pointer
62: */
64: #endif /* PETSC_USING_F90 */
65: #endif