From b4d744c2117d36ad8c51afdd2f53eb19fc608435 Mon Sep 17 00:00:00 2001 From: khizmax Date: Thu, 18 Sep 2014 19:38:50 +0400 Subject: [PATCH] Move cds/int_algo.h to cds/algo/int_algo.h --- cds/algo/flat_combining.h | 2 +- cds/{ => algo}/int_algo.h | 0 cds/intrusive/segmented_queue.h | 2 +- cds/intrusive/split_list_base.h | 2 +- cds/numtraits.h | 25 ------------------------- cds/opt/buffer.h | 2 +- projects/Win/vc12/cds.vcxproj | 1 - projects/Win/vc12/cds.vcxproj.filters | 3 --- src/ptb_gc.cpp | 2 +- tests/test-hdr/misc/bitop_st.cpp | 2 +- 10 files changed, 6 insertions(+), 35 deletions(-) rename cds/{ => algo}/int_algo.h (100%) diff --git a/cds/algo/flat_combining.h b/cds/algo/flat_combining.h index 4499dc03..4c707816 100644 --- a/cds/algo/flat_combining.h +++ b/cds/algo/flat_combining.h @@ -9,7 +9,7 @@ #include #include // lock_guard #include -#include +#include #include // thread_specific_ptr namespace cds { namespace algo { diff --git a/cds/int_algo.h b/cds/algo/int_algo.h similarity index 100% rename from cds/int_algo.h rename to cds/algo/int_algo.h diff --git a/cds/intrusive/segmented_queue.h b/cds/intrusive/segmented_queue.h index 2fb03952..18a9d45a 100644 --- a/cds/intrusive/segmented_queue.h +++ b/cds/intrusive/segmented_queue.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include #include diff --git a/cds/intrusive/split_list_base.h b/cds/intrusive/split_list_base.h index a5365535..a7bc10ab 100644 --- a/cds/intrusive/split_list_base.h +++ b/cds/intrusive/split_list_base.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include diff --git a/cds/numtraits.h b/cds/numtraits.h index 89f5aa76..df262a0a 100644 --- a/cds/numtraits.h +++ b/cds/numtraits.h @@ -55,31 +55,6 @@ namespace cds { }; //@endcond - //TODO - deprecated. Use is_power2 from int_algo.h - /// A tricky runtime algorithm to ensure that @p n is power of 2 - static inline bool isExp2( size_t n ) - { - return(n & (n - 1)) == 0 && n; - } - - //TODO: deprecated. Use log2 from int_algo.h - /// Runtime algorithm to compute log2( @p nTest ). If @p nTest is not power of two then -1 returns - static inline int exponent2( size_t nTest ) - { - int nExp = -1; - size_t nMask = 1; - for ( size_t n = 0; n < CDS_BUILD_BITS; n++ ) { - if ( nTest & nMask ) { - if ( nExp == -1 ) - nExp = (int) n; - else - return -1 ; // nTest íå ÿâëÿåòñÿ ñòåïåíüþ äâîéêè - } - nMask = nMask << 1; - } - return nExp; - } - /// Returns @a N: 2**N is nearest to @p nNumber, 2**N < nNumber static inline size_t exp2Ceil( size_t nNumber ) { diff --git a/cds/opt/buffer.h b/cds/opt/buffer.h index fe1d0815..71af760d 100644 --- a/cds/opt/buffer.h +++ b/cds/opt/buffer.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include namespace cds { namespace opt { diff --git a/projects/Win/vc12/cds.vcxproj b/projects/Win/vc12/cds.vcxproj index 90d9b8c9..2ef5e971 100644 --- a/projects/Win/vc12/cds.vcxproj +++ b/projects/Win/vc12/cds.vcxproj @@ -810,7 +810,6 @@ - diff --git a/projects/Win/vc12/cds.vcxproj.filters b/projects/Win/vc12/cds.vcxproj.filters index 9a573f08..3f678be6 100644 --- a/projects/Win/vc12/cds.vcxproj.filters +++ b/projects/Win/vc12/cds.vcxproj.filters @@ -197,9 +197,6 @@ Header Files\cds - - Header Files\cds - Header Files\cds diff --git a/src/ptb_gc.cpp b/src/ptb_gc.cpp index 12ceb7f9..9a11b0bf 100644 --- a/src/ptb_gc.cpp +++ b/src/ptb_gc.cpp @@ -3,7 +3,7 @@ // Pass The Buck (PTB) Memory manager implementation #include -#include +#include #include #include // std::fill diff --git a/tests/test-hdr/misc/bitop_st.cpp b/tests/test-hdr/misc/bitop_st.cpp index 01d4de77..391a2a70 100644 --- a/tests/test-hdr/misc/bitop_st.cpp +++ b/tests/test-hdr/misc/bitop_st.cpp @@ -2,7 +2,7 @@ #include "cppunit/cppunit_proxy.h" -#include +#include #include class bitop_ST : public CppUnitMini::TestCase -- 2.34.1