#include "petsc.h"
#include "petscfix.h"
/* sortip.c */
/* Fortran interface file */

/*
* This file was generated automatically by bfort from the C source
* file.  
 */

#ifdef PETSC_USE_POINTER_CONVERSION
#if defined(__cplusplus)
extern "C" { 
#endif 
extern void *PetscToPointer(void*);
extern int PetscFromPointer(void *);
extern void PetscRmPointer(void*);
#if defined(__cplusplus)
} 
#endif 

#else

#define PetscToPointer(a) (*(long *)(a))
#define PetscFromPointer(a) (long)(a)
#define PetscRmPointer(a)
#endif

#include "petsc.h"
#include "petscsys.h"
#ifdef MPI_BUILD_PROFILING
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsortintwithpermutation_ PPETSCSORTINTWITHPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsortintwithpermutation_ ppetscsortintwithpermutation
#else
#define petscsortintwithpermutation_ ppetscsortintwithpermutation_
#endif
#else
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsortintwithpermutation_ PETSCSORTINTWITHPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsortintwithpermutation_ petscsortintwithpermutation
#endif
#endif

#ifdef MPI_BUILD_PROFILING
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsortrealwithpermutation_ PPETSCSORTREALWITHPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsortrealwithpermutation_ ppetscsortrealwithpermutation
#else
#define petscsortrealwithpermutation_ ppetscsortrealwithpermutation_
#endif
#else
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsortrealwithpermutation_ PETSCSORTREALWITHPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsortrealwithpermutation_ petscsortrealwithpermutation
#endif
#endif



/* Definitions of Fortran Wrapper routines */
#if defined(__cplusplus)
extern "C" {
#endif
void PETSC_STDCALL   petscsortintwithpermutation_(PetscInt *n, PetscInt i[],PetscInt idx[], int *__ierr ){
*__ierr = PetscSortIntWithPermutation(*n,i,idx);
}
void PETSC_STDCALL   petscsortrealwithpermutation_(PetscInt *n, PetscReal i[],PetscInt idx[], int *__ierr ){
*__ierr = PetscSortRealWithPermutation(*n,i,idx);
}
#if defined(__cplusplus)
}
#endif
