[MOAB-dev] r5124 - in MOAB/trunk/itaps: . imesh

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Fri Aug 26 12:56:28 CDT 2011


Author: kraftche
Date: 2011-08-26 12:56:28 -0500 (Fri, 26 Aug 2011)
New Revision: 5124

Modified:
   MOAB/trunk/itaps/iBase_f.h
   MOAB/trunk/itaps/imesh/iMesh_f.h
Log:
More versatile solution for 64-bit Fortran
  - work in progress
  - works for gfortran (and probably intel fortran) 
  


Modified: MOAB/trunk/itaps/iBase_f.h
===================================================================
--- MOAB/trunk/itaps/iBase_f.h	2011-08-26 16:48:15 UTC (rev 5123)
+++ MOAB/trunk/itaps/iBase_f.h	2011-08-26 17:56:28 UTC (rev 5124)
@@ -1,10 +1,27 @@
 #ifndef IBASE_F_H
 #define IBASE_F_H
 
-#define iBase_EntityHandle integer
-#define iBase_EntitySetHandle integer
-#define iBase_TagHandle integer
+#ifdef __GFORTRAN__
+#  define IMESH_HANDLE_T integer*__SIZEOF_SIZE_T__
+#elif defined(__INTEL_COMPILER)
+#  ifdef __X86_64
+#    define IMESH_HANDLE_T integer*8
+#  else
+#    define IMESH_HANDLE_T integer*4
+#  endif
+#elif defined(__XLCPP__)
+% This doesn't work.  I cannot find a pre-defined macro to identify IBM XL Fortran
+        USE, INTRINSIC :: ISO_C_BINDING
+#  define IMESH_HANDLE_T C_PTR
+#else
+% Appliction must define PTRSIZE for unrecognized compilers
+#  define IMESH_HANDLE_T INTEGER*PTRSIZE
+#endif
 
+#define iBase_EntityHandle IMESH_HANDLE_T
+#define iBase_EntitySetHandle IMESH_HANDLE_T
+#define iBase_TagHandle IMESH_HANDLE_T
+
 #endif
 
       integer iBase_VERTEX

Modified: MOAB/trunk/itaps/imesh/iMesh_f.h
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_f.h	2011-08-26 16:48:15 UTC (rev 5123)
+++ MOAB/trunk/itaps/imesh/iMesh_f.h	2011-08-26 17:56:28 UTC (rev 5124)
@@ -1,14 +1,12 @@
 #ifndef IMESH_F_H
 #define IMESH_F_H
 
-#define iMesh_Instance integer*PTRSIZE
-#define iBase_EntityIterator integer*PTRSIZE
-#define iBase_EntityArrIterator integer*PTRSIZE
-
-#endif 
-
 #include "iBase_f.h"


More information about the moab-dev mailing list