CoinUtils trunk
|
00001 /* $Id$ */ 00002 // Copyright (C) 2004, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 // This code is licensed under the terms of the Eclipse Public License (EPL). 00005 00006 #ifndef _CoinTypes_hpp 00007 #define _CoinTypes_hpp 00008 00009 #include "CoinUtilsConfig.h" 00010 00011 #ifdef HAVE_CINTTYPES 00012 # include <cinttypes> 00013 #else 00014 # ifdef HAVE_INTTYPES_H 00015 # include <inttypes.h> 00016 # endif 00017 #endif 00018 00019 #define CoinInt64 COIN_INT64_T 00020 #define CoinUInt64 COIN_UINT64_T 00021 #define CoinIntPtr COIN_INTPTR_T 00022 00023 //============================================================================= 00024 #ifndef COIN_BIG_INDEX 00025 #define COIN_BIG_INDEX 0 00026 #endif 00027 00028 #if COIN_BIG_INDEX==0 00029 typedef int CoinBigIndex; 00030 #elif COIN_BIG_INDEX==1 00031 typedef long CoinBigIndex; 00032 #else 00033 typedef long long CoinBigIndex; 00034 #endif 00035 00036 //============================================================================= 00037 #ifndef COIN_BIG_DOUBLE 00038 #define COIN_BIG_DOUBLE 0 00039 #endif 00040 00041 // See if we want the ability to have long double work arrays 00042 #if COIN_BIG_DOUBLE==2 00043 #undef COIN_BIG_DOUBLE 00044 #define COIN_BIG_DOUBLE 0 00045 #define COIN_LONG_WORK 1 00046 typedef long double CoinWorkDouble; 00047 #elif COIN_BIG_DOUBLE==3 00048 #undef COIN_BIG_DOUBLE 00049 #define COIN_BIG_DOUBLE 1 00050 #define COIN_LONG_WORK 1 00051 typedef long double CoinWorkDouble; 00052 #else 00053 #define COIN_LONG_WORK 0 00054 typedef double CoinWorkDouble; 00055 #endif 00056 00057 #if COIN_BIG_DOUBLE==0 00058 typedef double CoinFactorizationDouble; 00059 #elif COIN_BIG_DOUBLE==1 00060 typedef long double CoinFactorizationDouble; 00061 #else 00062 typedef double CoinFactorizationDouble; 00063 #endif 00064 00065 #endif