OPTION(MEDCOUPLING_BUILD_TESTS "Build MED tests." ON)
OPTION(MEDCOUPLING_BUILD_DOC "Build MED doc." ON)
OPTION(MEDCOUPLING_BUILD_STATIC "Build MEDCoupling library in static mode." OFF)
+OPTION(MEDCOUPLING_USE_64BIT_IDS "Size of IDs to refer cells and nodes. 32 bits when OFF (default), 64 bits when ON. Not implemented yet for 64 bits." OFF)
IF(${MEDCOUPLING_USE_MPI})
SET(USE_METIS_NOT_PARMETIS OFF)
ELSE()
# Set list of prerequisites
# =========================
+IF(MEDCOUPLING_USE_64BIT_IDS)
+ ADD_DEFINITIONS("-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
+
IF(NOT MEDCOUPLING_MICROMED)
FIND_PACKAGE(SalomeHDF5 REQUIRED)
FIND_PACKAGE(SalomeMEDFile REQUIRED)
{
using Int64 = std::int64_t;
using Int32 = std::int32_t;
+#ifndef MEDCOUPLING_USE_64BIT_IDS
using mcIdType = std::int32_t;
-
+#else
+ using mcIdType = std::int64_t;
+#endif
inline mcIdType ToIdType(std::size_t val) { return mcIdType(val); }
}
#include "MEDCouplingRefCountObject.hxx"
#include "MEDCoupling_version.h"
+#include "MCType.hxx"
#include "InterpKernelException.hxx"
return 8*sizeof(std::size_t);
}
+std::size_t MEDCoupling::MEDCouplingSizeOfIDs()
+{
+ return 8*sizeof(mcIdType);
+}
+
/*!
* If true is returned it is a LittleEndian machine.
* If false it is a BigEndian machine.
MEDCOUPLING_EXPORT int MEDCouplingVersion();
MEDCOUPLING_EXPORT void MEDCouplingVersionMajMinRel(int& maj, int& minor, int& releas);
MEDCOUPLING_EXPORT int MEDCouplingSizeOfVoidStar();
+ MEDCOUPLING_EXPORT std::size_t MEDCouplingSizeOfIDs();
MEDCOUPLING_EXPORT bool MEDCouplingByteOrder();
MEDCOUPLING_EXPORT const char *MEDCouplingByteOrderStr();
MEDCOUPLING_EXPORT bool IsCXX11Compiled();
const char *MEDCouplingVersionStr();
int MEDCouplingVersion();
int MEDCouplingSizeOfVoidStar();
+ int MEDCouplingSizeOfIDs();
bool MEDCouplingByteOrder();
const char *MEDCouplingByteOrderStr();
bool IsCXX11Compiled();