/usr/include/hypre/fortran.h is in libhypre-dev 2.11.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License (as published by the Free
* Software Foundation) version 2.1 dated February 1999.
*
* $Revision$
***********************************************************************EHEADER*/
/******************************************************************************
*
* Fortran <-> C interface macros
*
* Developers should only use the following in hypre:
* hypre_F90_NAME() or hypre_F90_IFACE()
* hypre_F90_NAME_BLAS()
* hypre_F90_NAME_LAPACK()
* any of the interface argument macros at the bottom of this file
*
*****************************************************************************/
#ifndef HYPRE_FORT_HEADER
#define HYPRE_FORT_HEADER
#include "_hypre_utilities.h"
#ifdef __cplusplus
extern "C" {
#endif
/*-------------------------------------------------------
* Define specific name mangling macros to be used below
*-------------------------------------------------------*/
#define hypre_F90_NAME_1(name,NAME) name
#define hypre_F90_NAME_2(name,NAME) name##_
#define hypre_F90_NAME_3(name,NAME) name##__
#define hypre_F90_NAME_4(name,NAME) NAME
/*-------------------------------------------------------
* Define hypre_F90_NAME and hypre_F90_IFACE
*-------------------------------------------------------*/
#if (HYPRE_FMANGLE == 1)
#define hypre_F90_NAME(name,NAME) hypre_F90_NAME_1(name,NAME)
#elif (HYPRE_FMANGLE == 2)
#define hypre_F90_NAME(name,NAME) hypre_F90_NAME_2(name,NAME)
#elif (HYPRE_FMANGLE == 3)
#define hypre_F90_NAME(name,NAME) hypre_F90_NAME_3(name,NAME)
#elif (HYPRE_FMANGLE == 4)
#define hypre_F90_NAME(name,NAME) hypre_F90_NAME_4(name,NAME)
#elif defined(HYPRE_FC_FUNC_)
/* HYPRE_FC_FUNC_ macro assumes underscores exist in name */
#define hypre_F90_NAME(name,NAME) HYPRE_FC_FUNC_(name,NAME)
#else
#define hypre_F90_NAME(name,NAME) hypre_F90_NAME_2(name,NAME)
#endif
#define hypre_F90_IFACE(name,NAME) hypre_F90_NAME(name,NAME)
/*-------------------------------------------------------
* Define hypre_F90_NAME_BLAS
*-------------------------------------------------------*/
#ifdef HYPRE_USING_HYPRE_BLAS
#define hypre_F90_NAME_BLAS(name,NAME) hypre_##name
#elif (HYPRE_FMANGLE_BLAS == 1)
#define hypre_F90_NAME_BLAS(name,NAME) hypre_F90_NAME_1(name,NAME)
#elif (HYPRE_FMANGLE_BLAS == 2)
#define hypre_F90_NAME_BLAS(name,NAME) hypre_F90_NAME_2(name,NAME)
#elif (HYPRE_FMANGLE_BLAS == 3)
#define hypre_F90_NAME_BLAS(name,NAME) hypre_F90_NAME_3(name,NAME)
#elif (HYPRE_FMANGLE_BLAS == 4)
#define hypre_F90_NAME_BLAS(name,NAME) hypre_F90_NAME_4(name,NAME)
#elif defined(HYPRE_FC_FUNC)
/* HYPRE_FC_FUNC macro assumes NO underscores exist in name */
#define hypre_F90_NAME_BLAS(name,NAME) HYPRE_FC_FUNC(name,NAME)
#else
#define hypre_F90_NAME_BLAS(name,NAME) hypre_F90_NAME_2(name,NAME)
#endif
/*-------------------------------------------------------
* Define hypre_F90_NAME_LAPACK
*-------------------------------------------------------*/
#ifdef HYPRE_USING_HYPRE_LAPACK
#define hypre_F90_NAME_LAPACK(name,NAME) hypre_##name
#elif (HYPRE_FMANGLE_LAPACK == 1)
#define hypre_F90_NAME_LAPACK(name,NAME) hypre_F90_NAME_1(name,NAME)
#elif (HYPRE_FMANGLE_LAPACK == 2)
#define hypre_F90_NAME_LAPACK(name,NAME) hypre_F90_NAME_2(name,NAME)
#elif (HYPRE_FMANGLE_LAPACK == 3)
#define hypre_F90_NAME_LAPACK(name,NAME) hypre_F90_NAME_3(name,NAME)
#elif (HYPRE_FMANGLE_LAPACK == 4)
#define hypre_F90_NAME_LAPACK(name,NAME) hypre_F90_NAME_4(name,NAME)
#elif defined(HYPRE_FC_FUNC)
/* HYPRE_FC_FUNC macro assumes NO underscores exist in name */
#define hypre_F90_NAME_LAPACK(name,NAME) HYPRE_FC_FUNC(name,NAME)
#else
#define hypre_F90_NAME_LAPACK(name,NAME) hypre_F90_NAME_2(name,NAME)
#endif
/*-------------------------------------------------------
* Define interface argument types and macros
*
* A Fortran communicator is always the size of an integer
* and hence usually the size of hypre_int.
*-------------------------------------------------------*/
typedef hypre_int hypre_F90_Comm;
typedef HYPRE_Int hypre_F90_Int;
typedef HYPRE_Int hypre_F90_IntArray;
typedef HYPRE_Real hypre_F90_Real;
typedef HYPRE_Real hypre_F90_RealArray;
typedef HYPRE_Complex hypre_F90_Complex;
typedef HYPRE_Complex hypre_F90_ComplexArray;
typedef HYPRE_Int *hypre_F90_Obj;
typedef HYPRE_Int *hypre_F90_ObjRef;
#define hypre_F90_PassComm(arg) (hypre_MPI_Comm_f2c(*arg))
#define hypre_F90_PassInt(arg) ((HYPRE_Int) *arg)
#define hypre_F90_PassIntRef(arg) ((HYPRE_Int *) arg)
#define hypre_F90_PassIntArray(arg) ((HYPRE_Int *) arg)
#define hypre_F90_PassReal(arg) ((HYPRE_Real) *arg)
#define hypre_F90_PassRealRef(arg) ((HYPRE_Real *) arg)
#define hypre_F90_PassRealArray(arg) ((HYPRE_Real *) arg)
#define hypre_F90_PassComplex(arg) ((HYPRE_Complex) *arg)
#define hypre_F90_PassComplexRef(arg) ((HYPRE_Complex *) arg)
#define hypre_F90_PassComplexArray(arg) ((HYPRE_Complex *) arg)
#define hypre_F90_PassObj(obj,arg) ((obj) *arg)
#define hypre_F90_PassObjRef(obj,arg) ((obj *) arg)
#ifdef __cplusplus
}
#endif
#endif
|