Changes in / [1342:5c247b4dc708:1332:f28af6829e54] in lemon
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1340 r1327 66 66 FIND_PACKAGE(Doxygen) 67 67 FIND_PACKAGE(Ghostscript) 68 69 IF(WIN32)70 SET(LEMON_WIN32 TRUE)71 ENDIF(WIN32)72 68 73 69 SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.") -
lemon/bits/windows.cc
r1341 r1270 22 22 #include<lemon/bits/windows.h> 23 23 24 #if defined(LEMON_WIN32) && defined(__GNUC__) 25 #pragma GCC diagnostic ignored "-Wold-style-cast" 26 #endif 27 28 #ifdef LEMON_WIN32 24 #ifdef WIN32 29 25 #ifndef WIN32_LEAN_AND_MEAN 30 26 #define WIN32_LEAN_AND_MEAN … … 45 41 #include <unistd.h> 46 42 #include <ctime> 47 #ifndef LEMON_WIN3243 #ifndef WIN32 48 44 #include <sys/times.h> 49 45 #endif … … 60 56 double &cutime, double &cstime) 61 57 { 62 #ifdef LEMON_WIN3258 #ifdef WIN32 63 59 static const double ch = 4294967296.0e-7; 64 60 static const double cl = 1.0e-7; … … 99 95 { 100 96 std::ostringstream os; 101 #ifdef LEMON_WIN3297 #ifdef WIN32 102 98 SYSTEMTIME time; 103 99 GetSystemTime(&time); 104 100 char buf1[11], buf2[9], buf3[5]; 105 if (GetDateFormat(MY_LOCALE, 0, &time,101 if (GetDateFormat(MY_LOCALE, 0, &time, 106 102 ("ddd MMM dd"), buf1, 11) && 107 103 GetTimeFormat(MY_LOCALE, 0, &time, … … 125 121 int getWinRndSeed() 126 122 { 127 #ifdef LEMON_WIN32123 #ifdef WIN32 128 124 FILETIME time; 129 125 GetSystemTimeAsFileTime(&time); … … 137 133 138 134 WinLock::WinLock() { 139 #ifdef LEMON_WIN32135 #ifdef WIN32 140 136 CRITICAL_SECTION *lock = new CRITICAL_SECTION; 141 137 InitializeCriticalSection(lock); … … 147 143 148 144 WinLock::~WinLock() { 149 #ifdef LEMON_WIN32145 #ifdef WIN32 150 146 CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr); 151 147 DeleteCriticalSection(lock); … … 155 151 156 152 void WinLock::lock() { 157 #ifdef LEMON_WIN32153 #ifdef WIN32 158 154 CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr); 159 155 EnterCriticalSection(lock); … … 162 158 163 159 void WinLock::unlock() { 164 #ifdef LEMON_WIN32160 #ifdef WIN32 165 161 CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr); 166 162 LeaveCriticalSection(lock); -
lemon/bits/windows.h
r1340 r1270 20 20 #define LEMON_BITS_WINDOWS_H 21 21 22 #include <lemon/config.h>23 22 #include <string> 24 23 … … 36 35 ~WinLock(); 37 36 void lock(); 38 void unlock(); \37 void unlock(); 39 38 private: 40 39 void *_repr; -
lemon/config.h.in
r1340 r1306 1 #ifndef LEMON_CONFIG_H2 #define LEMON_CONFIG_H3 4 1 #define LEMON_VERSION "@PROJECT_VERSION@" 5 2 #cmakedefine LEMON_HAVE_LONG_LONG 1 6 7 #cmakedefine LEMON_WIN32 18 3 9 4 #cmakedefine LEMON_HAVE_LP 1 … … 15 10 #cmakedefine LEMON_HAVE_CBC 1 16 11 17 #define LEMON_CPLEX_118 #define LEMON_CLP_219 #define LEMON_GLPK_320 #define LEMON_SOPLEX_421 #define LEMON_CBC_512 #define _LEMON_CPLEX 1 13 #define _LEMON_CLP 2 14 #define _LEMON_GLPK 3 15 #define _LEMON_SOPLEX 4 16 #define _LEMON_CBC 5 22 17 23 #cmakedefine LEMON_DEFAULT_LP LEMON_@LEMON_DEFAULT_LP@_24 #cmakedefine LEMON_DEFAULT_MIP LEMON_@LEMON_DEFAULT_MIP@_18 #cmakedefine LEMON_DEFAULT_LP _LEMON_@LEMON_DEFAULT_LP@ 19 #cmakedefine LEMON_DEFAULT_MIP _LEMON_@LEMON_DEFAULT_MIP@ 25 20 26 21 #cmakedefine LEMON_USE_PTHREAD 1 27 22 #cmakedefine LEMON_USE_WIN32_THREADS 1 28 29 #endif -
lemon/core.h
r1341 r1327 20 20 #define LEMON_CORE_H 21 21 22 ///\file 23 ///\brief LEMON core utilities. 24 /// 25 ///This header file contains core utilities for LEMON. 26 ///It is automatically included by all graph types, therefore it usually 27 ///do not have to be included directly. 22 #include <vector> 23 #include <algorithm> 24 25 #include <lemon/config.h> 26 #include <lemon/bits/enable_if.h> 27 #include <lemon/bits/traits.h> 28 #include <lemon/assert.h> 28 29 29 30 // Disable the following warnings when compiling with MSVC: … … 43 44 #endif 44 45 45 #include <vector> 46 #include <algorithm> 47 48 #include <lemon/config.h> 49 #include <lemon/bits/enable_if.h> 50 #include <lemon/bits/traits.h> 51 #include <lemon/assert.h> 52 53 46 ///\file 47 ///\brief LEMON core utilities. 48 /// 49 ///This header file contains core utilities for LEMON. 50 ///It is automatically included by all graph types, therefore it usually 51 ///do not have to be included directly. 54 52 55 53 namespace lemon { -
lemon/graph_to_eps.h
r1340 r1291 26 26 #include<vector> 27 27 28 #ifndef LEMON_WIN3228 #ifndef WIN32 29 29 #include<sys/time.h> 30 30 #include<ctime> … … 675 675 { 676 676 os << "%%CreationDate: "; 677 #ifndef LEMON_WIN32677 #ifndef WIN32 678 678 timeval tv; 679 679 gettimeofday(&tv, 0); -
lemon/lp.h
r1340 r1323 23 23 24 24 25 #if LEMON_DEFAULT_LP == LEMON_GLPK_ || LEMON_DEFAULT_MIP == LEMON_GLPK_25 #if LEMON_DEFAULT_LP == _LEMON_GLPK || LEMON_DEFAULT_MIP == _LEMON_GLPK 26 26 #include <lemon/glpk.h> 27 27 #endif 28 #if LEMON_DEFAULT_LP == LEMON_CPLEX_ || LEMON_DEFAULT_MIP == LEMON_CPLEX_28 #if LEMON_DEFAULT_LP == _LEMON_CPLEX || LEMON_DEFAULT_MIP == _LEMON_CPLEX 29 29 #include <lemon/cplex.h> 30 30 #endif 31 #if LEMON_DEFAULT_LP == LEMON_SOPLEX_31 #if LEMON_DEFAULT_LP == _LEMON_SOPLEX 32 32 #include <lemon/soplex.h> 33 33 #endif 34 #if LEMON_DEFAULT_LP == LEMON_CLP_34 #if LEMON_DEFAULT_LP == _LEMON_CLP 35 35 #include <lemon/clp.h> 36 36 #endif 37 #if LEMON_DEFAULT_MIP == LEMON_CBC_37 #if LEMON_DEFAULT_MIP == _LEMON_CBC 38 38 #include <lemon/cbc.h> 39 39 #endif … … 50 50 ///\ingroup lp_group 51 51 /// 52 ///Currently, the possible values are \c LEMON_GLPK_, \c LEMON_CPLEX_,53 ///\c LEMON_SOPLEX_ or \c LEMON_CLP_52 ///Currently, the possible values are \c _LEMON_GLPK, \c LEMON__CPLEX, 53 ///\c _LEMON_SOPLEX or \c LEMON__CLP 54 54 #define LEMON_DEFAULT_LP SOLVER 55 55 ///The default LP solver … … 66 66 ///\ingroup lp_group 67 67 /// 68 ///Currently, the possible values are \c LEMON_GLPK_, \c LEMON_CPLEX_69 ///or \c LEMON_CBC_68 ///Currently, the possible values are \c _LEMON_GLPK, \c LEMON__CPLEX 69 ///or \c _LEMON_CBC 70 70 #define LEMON_DEFAULT_MIP SOLVER 71 71 ///The default MIP solver. … … 77 77 typedef GlpkMip Mip; 78 78 #else 79 #if LEMON_DEFAULT_LP == LEMON_GLPK_79 #if LEMON_DEFAULT_LP == _LEMON_GLPK 80 80 typedef GlpkLp Lp; 81 #elif LEMON_DEFAULT_LP == LEMON_CPLEX_81 #elif LEMON_DEFAULT_LP == _LEMON_CPLEX 82 82 typedef CplexLp Lp; 83 #elif LEMON_DEFAULT_LP == LEMON_SOPLEX_83 #elif LEMON_DEFAULT_LP == _LEMON_SOPLEX 84 84 typedef SoplexLp Lp; 85 #elif LEMON_DEFAULT_LP == LEMON_CLP_85 #elif LEMON_DEFAULT_LP == _LEMON_CLP 86 86 typedef ClpLp Lp; 87 87 #endif 88 #if LEMON_DEFAULT_MIP == LEMON_GLPK_88 #if LEMON_DEFAULT_MIP == _LEMON_GLPK 89 89 typedef GlpkMip Mip; 90 #elif LEMON_DEFAULT_MIP == LEMON_CPLEX_90 #elif LEMON_DEFAULT_MIP == _LEMON_CPLEX 91 91 typedef CplexMip Mip; 92 #elif LEMON_DEFAULT_MIP == LEMON_CBC_92 #elif LEMON_DEFAULT_MIP == _LEMON_CBC 93 93 typedef CbcMip Mip; 94 94 #endif -
lemon/random.h
r1340 r1328 63 63 #define LEMON_RANDOM_H 64 64 65 #include <lemon/config.h>66 67 65 #include <algorithm> 68 66 #include <iterator> … … 74 72 #include <lemon/dim2.h> 75 73 76 #ifndef LEMON_WIN3274 #ifndef WIN32 77 75 #include <sys/time.h> 78 76 #include <ctime> … … 608 606 /// \return Currently always \c true. 609 607 bool seed() { 610 #ifndef LEMON_WIN32608 #ifndef WIN32 611 609 if (seedFromFile("/dev/urandom", 0)) return true; 612 610 #endif … … 628 626 /// \param offset The offset, from the file read. 629 627 /// \return \c true when the seeding successes. 630 #ifndef LEMON_WIN32628 #ifndef WIN32 631 629 bool seedFromFile(const std::string& file = "/dev/urandom", int offset = 0) 632 630 #else … … 650 648 /// \return Currently always \c true. 651 649 bool seedFromTime() { 652 #ifndef LEMON_WIN32650 #ifndef WIN32 653 651 timeval tv; 654 652 gettimeofday(&tv, 0); -
lemon/time_measure.h
r1340 r1270 24 24 ///\brief Tools for measuring cpu usage 25 25 26 #include <lemon/config.h> 27 28 #ifdef LEMON_WIN32 26 #ifdef WIN32 29 27 #include <lemon/bits/windows.h> 30 28 #else … … 105 103 void stamp() 106 104 { 107 #ifndef LEMON_WIN32105 #ifndef WIN32 108 106 timeval tv; 109 107 gettimeofday(&tv, 0); -
test/radix_sort_test.cc
r1341 r1270 16 16 * 17 17 */ 18 19 #include <lemon/core.h>20 18 21 19 #include <lemon/time_measure.h>
Note: See TracChangeset
for help on using the changeset viewer.