Actual source code: zrandomf.c

      1: #include <petsc/private/fortranimpl.h>
      2: #include <petscsys.h>

      4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      5:   #define petscrandomsetseed_ PETSCRANDOMSETSEED
      6:   #define petscrandomgetseed_ PETSCRANDOMGETSEED
      7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
      8:   #define petscrandomsetseed_ petscrandomsetseed
      9:   #define petscrandomgetseed_ petscrandomgetseed
     10: #endif

     12: PETSC_EXTERN void petscrandomgetseed_(PetscRandom *r, unsigned long *seed, PetscErrorCode *ierr)
     13: {
     14:   *ierr = PetscRandomGetSeed(*r, seed);
     15: }
     16: PETSC_EXTERN void petscrandomsetseed_(PetscRandom *r, unsigned long *seed, PetscErrorCode *ierr)
     17: {
     18:   *ierr = PetscRandomSetSeed(*r, *seed);
     19: }