diff options
author | n0n4m3 <none@none> | 2009-12-17 07:34:00 +0100 |
---|---|---|
committer | n0n4m3 <none@none> | 2009-12-17 07:34:00 +0100 |
commit | 2028f0658b2bb95e2390aba8fd995271fe4e41d6 (patch) | |
tree | 0b468a4234b90588e7b7e799b7581b57800add2d /src/shared/Util.cpp | |
parent | 8507b7da9902303189e9d01c8c23d1aaf8d656bd (diff) |
Removed mtmaps OpenMP
Implement mtmaps based on ACE
For stable work MapUpdate.Threads=2 in config
--HG--
branch : trunk
Diffstat (limited to 'src/shared/Util.cpp')
-rw-r--r-- | src/shared/Util.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp index 9846b48286c..c5384b6f32e 100644 --- a/src/shared/Util.cpp +++ b/src/shared/Util.cpp @@ -28,60 +28,6 @@ typedef ACE_TSS<MTRand> MTRandTSS; static MTRandTSS mtRand; -#ifdef MULTI_THREAD_MAP - -int32 irand (int32 min, int32 max) -{ - int32 result; -#pragma omp critical (mtrand) -{ - result = int32 (mtRand->randInt (max - min)) + min; -} - return result; -} - -uint32 urand (uint32 min, uint32 max) -{ - uint32 result; -#pragma omp critical (mtrand) -{ - result = mtRand->randInt (max - min) + min; -} - return result; -} - -int32 rand32 () -{ - int32 result; -#pragma omp critical (mtrand) -{ - result = mtRand->randInt (); -} - return result; -} - -double rand_norm(void) -{ - double result; -#pragma omp critical (mtrand) -{ - result = mtRand->randExc (); -} - return result; -} - -double rand_chance (void) -{ - double result; -#pragma omp critical (mtrand) -{ - result = mtRand->randExc (100.0); -} - return result; -} - -#else - int32 irand (int32 min, int32 max) { return int32 (mtRand->randInt (max - min)) + min; @@ -107,8 +53,6 @@ double rand_chance (void) return mtRand->randExc (100.0); } -#endif - Tokens StrSplit(const std::string &src, const std::string &sep) { Tokens r; |