From 6d961d87f85fa85112ee652d824bf9839ac2b2da Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Mon, 17 Jun 2013 09:31:21 -0700 Subject: [PATCH] Add beast_basics and remove unused modules from build --- Builds/VisualStudio2012/beast.vcxproj | 5 -- Builds/VisualStudio2012/beast.vcxproj.filters | 6 -- .../beast_basics/math/beast_MurmurHash.cpp | 12 +-- .../native/beast_posix_FPUFlags.cpp | 2 +- .../beast_basics/threads/beast_Listeners.h | 90 +++++++++---------- .../beast_basics/threads/beast_ParallelFor.h | 18 ++-- 6 files changed, 59 insertions(+), 74 deletions(-) diff --git a/Builds/VisualStudio2012/beast.vcxproj b/Builds/VisualStudio2012/beast.vcxproj index 2ca33570ff..04af470a2b 100644 --- a/Builds/VisualStudio2012/beast.vcxproj +++ b/Builds/VisualStudio2012/beast.vcxproj @@ -86,7 +86,6 @@ - @@ -295,10 +294,6 @@ true true - - true - true - true true diff --git a/Builds/VisualStudio2012/beast.vcxproj.filters b/Builds/VisualStudio2012/beast.vcxproj.filters index 6e878aa909..f2f88ba0bc 100644 --- a/Builds/VisualStudio2012/beast.vcxproj.filters +++ b/Builds/VisualStudio2012/beast.vcxproj.filters @@ -596,9 +596,6 @@ beast_basics\threads - - beast_basics\threads - beast_basics\threads @@ -937,9 +934,6 @@ beast_basics\threads - - beast_basics\threads - beast_basics\threads diff --git a/modules/beast_basics/math/beast_MurmurHash.cpp b/modules/beast_basics/math/beast_MurmurHash.cpp index 9b8c4311bb..8f7d7be2d1 100644 --- a/modules/beast_basics/math/beast_MurmurHash.cpp +++ b/modules/beast_basics/math/beast_MurmurHash.cpp @@ -29,8 +29,6 @@ namespace Murmur #if BEAST_MSVC -#define FORCE_INLINE __forceinline - #define ROTL32(x,y) _rotl(x,y) #define ROTL64(x,y) _rotl64(x,y) @@ -40,8 +38,6 @@ namespace Murmur #else -#define FORCE_INLINE __attribute__((always_inline)) - static inline uint32_t rotl32 ( uint32_t x, int8_t r ) { return (x << r) | (x >> (32 - r)); @@ -63,12 +59,12 @@ static inline uint64_t rotl64 ( uint64_t x, int8_t r ) // Block read - if your platform needs to do endian-swapping or can only // handle aligned reads, do the conversion here -static FORCE_INLINE uint32_t getblock ( const uint32_t* p, int i ) +static forcedinline uint32_t getblock ( const uint32_t* p, int i ) { return p[i]; } -static FORCE_INLINE uint64_t getblock ( const uint64_t* p, int i ) +static forcedinline uint64_t getblock ( const uint64_t* p, int i ) { return p[i]; } @@ -76,7 +72,7 @@ static FORCE_INLINE uint64_t getblock ( const uint64_t* p, int i ) //----------------------------------------------------------------------------- // Finalization mix - force all bits of a hash block to avalanche -static FORCE_INLINE uint32_t fmix ( uint32_t h ) +static forcedinline uint32_t fmix ( uint32_t h ) { h ^= h >> 16; h *= 0x85ebca6b; @@ -89,7 +85,7 @@ static FORCE_INLINE uint32_t fmix ( uint32_t h ) //---------- -static FORCE_INLINE uint64_t fmix ( uint64_t k ) +static forcedinline uint64_t fmix ( uint64_t k ) { k ^= k >> 33; k *= BIG_CONSTANT (0xff51afd7ed558ccd); diff --git a/modules/beast_basics/native/beast_posix_FPUFlags.cpp b/modules/beast_basics/native/beast_posix_FPUFlags.cpp index 99938f2a6f..09a2f75a30 100644 --- a/modules/beast_basics/native/beast_posix_FPUFlags.cpp +++ b/modules/beast_basics/native/beast_posix_FPUFlags.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#pragma message(BEAST_LOC_"Missing platform-specific implementation") +//#pragma message(BEAST_LOC_"Missing platform-specific implementation") FPUFlags FPUFlags::getCurrent () { diff --git a/modules/beast_basics/threads/beast_Listeners.h b/modules/beast_basics/threads/beast_Listeners.h index 1d522df619..9236771890 100644 --- a/modules/beast_basics/threads/beast_Listeners.h +++ b/modules/beast_basics/threads/beast_Listeners.h @@ -475,7 +475,7 @@ public: template inline void call (Mf mf) { - callf (vf::bind (mf, vf::_1)); + callf (bind (mf, _1)); } #endif @@ -483,7 +483,7 @@ public: template void call (Mf mf, T1 t1) { - callf (vf::bind (mf, vf::_1, t1)); + callf (bind (mf, _1, t1)); } #endif @@ -491,7 +491,7 @@ public: template void call (Mf mf, T1 t1, T2 t2) { - callf (vf::bind (mf, vf::_1, t1, t2)); + callf (bind (mf, _1, t1, t2)); } #endif @@ -499,7 +499,7 @@ public: template void call (Mf mf, T1 t1, T2 t2, T3 t3) { - callf (vf::bind (mf, vf::_1, t1, t2, t3)); + callf (bind (mf, _1, t1, t2, t3)); } #endif @@ -507,7 +507,7 @@ public: template void call (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4) { - callf (vf::bind (mf, vf::_1, t1, t2, t3, t4)); + callf (bind (mf, _1, t1, t2, t3, t4)); } #endif @@ -515,7 +515,7 @@ public: template void call (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - callf (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5)); + callf (bind (mf, _1, t1, t2, t3, t4, t5)); } #endif @@ -523,7 +523,7 @@ public: template void call (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { - callf (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6)); + callf (bind (mf, _1, t1, t2, t3, t4, t5, t6)); } #endif @@ -531,7 +531,7 @@ public: template void call (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { - callf (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7)); + callf (bind (mf, _1, t1, t2, t3, t4, t5, t6, t7)); } #endif @@ -539,7 +539,7 @@ public: template void call (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { - callf (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7, t8)); + callf (bind (mf, _1, t1, t2, t3, t4, t5, t6, t7, t8)); } #endif /** @} */ @@ -557,7 +557,7 @@ public: template inline void queue (Mf mf) { - queuef (vf::bind (mf, vf::_1)); + queuef (bind (mf, _1)); } #endif @@ -565,7 +565,7 @@ public: template void queue (Mf mf, T1 t1) { - queuef (vf::bind (mf, vf::_1, t1)); + queuef (bind (mf, _1, t1)); } #endif @@ -573,7 +573,7 @@ public: template void queue (Mf mf, T1 t1, T2 t2) { - queuef (vf::bind (mf, vf::_1, t1, t2)); + queuef (bind (mf, _1, t1, t2)); } #endif @@ -581,7 +581,7 @@ public: template void queue (Mf mf, T1 t1, T2 t2, T3 t3) { - queuef (vf::bind (mf, vf::_1, t1, t2, t3)); + queuef (bind (mf, _1, t1, t2, t3)); } #endif @@ -589,7 +589,7 @@ public: template void queue (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4) { - queuef (vf::bind (mf, vf::_1, t1, t2, t3, t4)); + queuef (bind (mf, _1, t1, t2, t3, t4)); } #endif @@ -597,7 +597,7 @@ public: template void queue (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - queuef (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5)); + queuef (bind (mf, _1, t1, t2, t3, t4, t5)); } #endif @@ -605,7 +605,7 @@ public: template void queue (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { - queuef (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6)); + queuef (bind (mf, _1, t1, t2, t3, t4, t5, t6)); } #endif @@ -613,7 +613,7 @@ public: template void queue (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { - queuef (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7)); + queuef (bind (mf, _1, t1, t2, t3, t4, t5, t6, t7)); } #endif @@ -621,7 +621,7 @@ public: template void queue (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { - queuef (vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7, t8)); + queuef (bind (mf, _1, t1, t2, t3, t4, t5, t6, t7, t8)); } #endif /** @} */ @@ -645,7 +645,7 @@ public: template inline void update (Mf mf) { - updatef (mf, vf::bind (mf, vf::_1)); + updatef (mf, bind (mf, _1)); } #endif @@ -653,7 +653,7 @@ public: template void update (Mf mf, T1 t1) { - updatef (mf, vf::bind (mf, vf::_1, t1)); + updatef (mf, bind (mf, _1, t1)); } #endif @@ -661,7 +661,7 @@ public: template void update (Mf mf, T1 t1, T2 t2) { - updatef (mf, vf::bind (mf, vf::_1, t1, t2)); + updatef (mf, bind (mf, _1, t1, t2)); } #endif @@ -669,7 +669,7 @@ public: template void update (Mf mf, T1 t1, T2 t2, T3 t3) { - updatef (mf, vf::bind (mf, vf::_1, t1, t2, t3)); + updatef (mf, bind (mf, _1, t1, t2, t3)); } #endif @@ -677,7 +677,7 @@ public: template void update (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4) { - updatef (mf, vf::bind (mf, vf::_1, t1, t2, t3, t4)); + updatef (mf, bind (mf, _1, t1, t2, t3, t4)); } #endif @@ -685,7 +685,7 @@ public: template void update (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - updatef (mf, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5)); + updatef (mf, bind (mf, _1, t1, t2, t3, t4, t5)); } #endif @@ -693,7 +693,7 @@ public: template void update (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { - updatef (mf, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6)); + updatef (mf, bind (mf, _1, t1, t2, t3, t4, t5, t6)); } #endif @@ -701,7 +701,7 @@ public: template void update (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { - updatef (mf, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7)); + updatef (mf, bind (mf, _1, t1, t2, t3, t4, t5, t6, t7)); } #endif @@ -709,7 +709,7 @@ public: template void update (Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { - updatef (mf, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7, t8)); + updatef (mf, bind (mf, _1, t1, t2, t3, t4, t5, t6, t7, t8)); } #endif /** @} */ @@ -730,7 +730,7 @@ public: template inline void call1 (ListenerClass* const listener, Mf mf) { - call1f (listener, vf::bind (mf, vf::_1)); + call1f (listener, bind (mf, _1)); } #endif @@ -738,7 +738,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1) { - call1f (listener, vf::bind (mf, vf::_1, t1)); + call1f (listener, bind (mf, _1, t1)); } #endif @@ -746,7 +746,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2) { - call1f (listener, vf::bind (mf, vf::_1, t1, t2)); + call1f (listener, bind (mf, _1, t1, t2)); } #endif @@ -754,7 +754,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3) { - call1f (listener, vf::bind (mf, vf::_1, t1, t2, t3)); + call1f (listener, bind (mf, _1, t1, t2, t3)); } #endif @@ -762,7 +762,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4) { - call1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4)); + call1f (listener, bind (mf, _1, t1, t2, t3, t4)); } #endif @@ -770,7 +770,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - call1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5)); + call1f (listener, bind (mf, _1, t1, t2, t3, t4, t5)); } #endif @@ -778,7 +778,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { - call1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6)); + call1f (listener, bind (mf, _1, t1, t2, t3, t4, t5, t6)); } #endif @@ -786,7 +786,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { - call1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7)); + call1f (listener, bind (mf, _1, t1, t2, t3, t4, t5, t6, t7)); } #endif @@ -794,7 +794,7 @@ public: template void call1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { - call1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7, t8)); + call1f (listener, bind (mf, _1, t1, t2, t3, t4, t5, t6, t7, t8)); } #endif /** @} */ @@ -813,7 +813,7 @@ public: template inline void queue1 (ListenerClass* const listener, Mf mf) { - queue1f (listener, vf::bind (mf, vf::_1)); + queue1f (listener, bind (mf, _1)); } #endif @@ -821,7 +821,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1) { - queue1f (listener, vf::bind (mf, vf::_1, t1)); + queue1f (listener, bind (mf, _1, t1)); } #endif @@ -829,7 +829,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2) { - queue1f (listener, vf::bind (mf, vf::_1, t1, t2)); + queue1f (listener, bind (mf, _1, t1, t2)); } #endif @@ -837,7 +837,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3) { - queue1f (listener, vf::bind (mf, vf::_1, t1, t2, t3)); + queue1f (listener, bind (mf, _1, t1, t2, t3)); } #endif @@ -845,7 +845,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4) { - queue1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4)); + queue1f (listener, bind (mf, _1, t1, t2, t3, t4)); } #endif @@ -853,7 +853,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - queue1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5)); + queue1f (listener, bind (mf, _1, t1, t2, t3, t4, t5)); } #endif @@ -861,7 +861,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { - queue1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6)); + queue1f (listener, bind (mf, _1, t1, t2, t3, t4, t5, t6)); } #endif @@ -869,7 +869,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { - queue1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7)); + queue1f (listener, bind (mf, _1, t1, t2, t3, t4, t5, t6, t7)); } #endif @@ -877,7 +877,7 @@ public: template void queue1 (ListenerClass* const listener, Mf mf, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { - queue1f (listener, vf::bind (mf, vf::_1, t1, t2, t3, t4, t5, t6, t7, t8)); + queue1f (listener, bind (mf, _1, t1, t2, t3, t4, t5, t6, t7, t8)); } #endif /** @} */ diff --git a/modules/beast_basics/threads/beast_ParallelFor.h b/modules/beast_basics/threads/beast_ParallelFor.h index ca7bc461d1..7cf6b45d5c 100644 --- a/modules/beast_basics/threads/beast_ParallelFor.h +++ b/modules/beast_basics/threads/beast_ParallelFor.h @@ -98,7 +98,7 @@ public: template void loop (int n, Fn f) { - loopf (n, vf::bind (f, vf::_1)); + loopf (n, bind (f, _1)); } #endif @@ -106,7 +106,7 @@ public: template void loop (int n, Fn f, T1 t1) { - loopf (n, vf::bind (f, t1, vf::_1)); + loopf (n, bind (f, t1, _1)); } #endif @@ -114,7 +114,7 @@ public: template void loop (int n, Fn f, T1 t1, T2 t2) { - loopf (n, vf::bind (f, t1, t2, vf::_1)); + loopf (n, bind (f, t1, t2, _1)); } #endif @@ -122,7 +122,7 @@ public: template void loop (int n, Fn f, T1 t1, T2 t2, T3 t3) { - loopf (n, vf::bind (f, t1, t2, t3, vf::_1)); + loopf (n, bind (f, t1, t2, t3, _1)); } #endif @@ -130,7 +130,7 @@ public: template void loop (int n, Fn f, T1 t1, T2 t2, T3 t3, T4 t4) { - loopf (n, vf::bind (f, t1, t2, t3, t4, vf::_1)); + loopf (n, bind (f, t1, t2, t3, t4, _1)); } #endif @@ -138,7 +138,7 @@ public: template void loop (int n, Fn f, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - loopf (n, vf::bind (f, t1, t2, t3, t4, t5, vf::_1)); + loopf (n, bind (f, t1, t2, t3, t4, t5, _1)); } #endif @@ -146,7 +146,7 @@ public: template void loop (int n, Fn f, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { - loopf (n, vf::bind (f, t1, t2, t3, t4, t5, t6, vf::_1)); + loopf (n, bind (f, t1, t2, t3, t4, t5, t6, _1)); } #endif @@ -154,7 +154,7 @@ public: template void loop (int n, Fn f, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { - loopf (n, vf::bind (f, t1, t2, t3, t4, t5, t6, t7, vf::_1)); + loopf (n, bind (f, t1, t2, t3, t4, t5, t6, t7, _1)); } #endif @@ -162,7 +162,7 @@ public: template void loop (int n, Fn f, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { - loopf (n, vf::bind (f, t1, t2, t3, t4, t5, t6, t7, t8, vf::_1)); + loopf (n, bind (f, t1, t2, t3, t4, t5, t6, t7, t8, _1)); } #endif /** @} */