Skip to content

Commit 9bcb218

Browse files
committed
formatting
1 parent c127b17 commit 9bcb218

25 files changed

Lines changed: 54 additions & 54 deletions

File tree

cds/algo/bit_reversal.h

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ namespace cds { namespace algo {
5454
/// 64bit
5555
uint64_t operator()( uint64_t x ) const
5656
{
57-
return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x )) ) << 32 ) // low 32bit
58-
| ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 )) )); // high 32bit
57+
return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x ))) << 32 ) // low 32bit
58+
| ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 )))); // high 32bit
5959
}
6060
};
6161

@@ -93,8 +93,8 @@ namespace cds { namespace algo {
9393
/// 64bit
9494
uint64_t operator()( uint64_t x ) const
9595
{
96-
return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x )) ) << 32 ) |
97-
static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 )) );
96+
return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x ))) << 32 ) |
97+
static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 )));
9898
}
9999
};
100100

@@ -117,43 +117,43 @@ namespace cds { namespace algo {
117117
// for 32bit architecture
118118
static uint32_t muldiv32( uint32_t x )
119119
{
120-
return static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 )) )
121-
| ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 )) ) << 8 )
122-
| ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 )) ) << 16 )
123-
| ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x )) ) << 24 );
120+
return static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 )))
121+
| ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 ))) << 8 )
122+
| ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 ))) << 16 )
123+
| ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x ))) << 24 );
124124
}
125125

126126
static uint64_t muldiv32( uint64_t x )
127127
{
128-
return static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 56 )) )
129-
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 48 )) ) << 8 )
130-
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 40 )) ) << 16 )
131-
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 32 )) ) << 24 )
132-
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 )) ) << 32 )
133-
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 )) ) << 40 )
134-
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 )) ) << 48 )
135-
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x )) ) << 56 );
128+
return static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 56 )))
129+
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 48 ))) << 8 )
130+
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 40 ))) << 16 )
131+
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 32 ))) << 24 )
132+
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 ))) << 32 )
133+
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 ))) << 40 )
134+
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 ))) << 48 )
135+
| ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x ))) << 56 );
136136
}
137137

138138
/// for 64bit architectire
139139
static uint32_t muldiv64( uint32_t x )
140140
{
141-
return static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 )) )
142-
| ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 )) ) << 8 )
143-
| ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 )) ) << 16 )
144-
| ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x )) ) << 24 );
141+
return static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 )))
142+
| ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 ))) << 8 )
143+
| ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 ))) << 16 )
144+
| ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x ))) << 24 );
145145
}
146146

147147
static uint64_t muldiv64( uint64_t x )
148148
{
149-
return static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 56 )) )
150-
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 48 )) ) << 8 )
151-
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 40 )) ) << 16 )
152-
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 32 )) ) << 24 )
153-
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 )) ) << 32 )
154-
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 )) ) << 40 )
155-
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 )) ) << 48 )
156-
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x )) ) << 56 );
149+
return static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 56 )))
150+
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 48 ))) << 8 )
151+
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 40 ))) << 16 )
152+
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 32 ))) << 24 )
153+
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 ))) << 32 )
154+
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 ))) << 40 )
155+
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 ))) << 48 )
156+
| ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x ))) << 56 );
157157
}
158158
//@endcond
159159

cds/container/impl/bronson_avltree_map_rcu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ namespace cds { namespace container {
17851785

17861786
int hLRL = height_null( child( pLRight, left_child, memory_model::memory_order_relaxed ), memory_model::memory_order_acquire );
17871787
int balance = hLL - hLRL;
1788-
if ( balance >= -1 && balance <= 1 && !( ( hLL == 0 || hLRL == 0 ) && !pLeft->is_valued( memory_model::memory_order_relaxed )) ) {
1788+
if ( balance >= -1 && balance <= 1 && !( ( hLL == 0 || hLRL == 0 ) && !pLeft->is_valued( memory_model::memory_order_relaxed ))) {
17891789
// nParent.child.left won't be damaged after a double rotation
17901790
return rotate_right_over_left_locked( pParent, pNode, pLeft, hR, hLL, pLRight, hLRL );
17911791
}
@@ -1840,7 +1840,7 @@ namespace cds { namespace container {
18401840
node_type * pRLRight = child( pRLeft, right_child, memory_model::memory_order_relaxed );
18411841
int hRLR = height_null( pRLRight, memory_model::memory_order_acquire );
18421842
int balance = hRR - hRLR;
1843-
if ( balance >= -1 && balance <= 1 && !( ( hRR == 0 || hRLR == 0 ) && !pRight->is_valued( memory_model::memory_order_relaxed )) )
1843+
if ( balance >= -1 && balance <= 1 && !( ( hRR == 0 || hRLR == 0 ) && !pRight->is_valued( memory_model::memory_order_relaxed )))
18441844
return rotate_left_over_right_locked( pParent, pNode, hL, pRight, pRLeft, hRR, hRLR );
18451845
}
18461846

cds/gc/dhp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ namespace cds { namespace gc {
687687
688688
@note Internally, %DHP depends on free-list implementation. There are
689689
DCAS-based free-list \p cds::intrusive::TaggedFreeList and more complicated CAS-based free-list
690-
\p cds::intrusive::FreeList. For x86 architecture and GCC/clang, libcds selects appropriate free-list
690+
\p cds::intrusive::FreeList. For x86 architecture and GCC/clang, libcds selects appropriate free-list
691691
based on \p -mcx16 compiler flag. You may manually disable DCAS support specifying
692692
\p -DCDS_DISABLE_128BIT_ATOMIC for 64bit build or \p -DCDS_DISABLE_64BIT_ATOMIC for 32bit build
693693
in compiler command line. All your projects and libcds MUST be compiled with the same flags -
@@ -1393,7 +1393,7 @@ namespace cds { namespace gc {
13931393
static void retire( T * p, void (* func)(void *))
13941394
{
13951395
dhp::thread_data* rec = dhp::smr::tls();
1396-
if ( !rec->retired_.push( dhp::retired_ptr( p, func )) )
1396+
if ( !rec->retired_.push( dhp::retired_ptr( p, func )))
13971397
dhp::smr::instance().scan( rec );
13981398
}
13991399

src/dhp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ namespace cds { namespace gc { namespace dhp {
118118

119119
CDS_EXPORT_API retired_allocator::~retired_allocator()
120120
{
121-
while ( retired_block* rb = static_cast<retired_block*>( free_list_.get()) ) {
121+
while ( retired_block* rb = static_cast<retired_block*>( free_list_.get())) {
122122
rb->~retired_block();
123123
s_free_memory( rb );
124124
}

test/stress/map/del3/map_del3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@ namespace map {
125125
}
126126
INSTANTIATE_TEST_CASE_P( a, Map_Del3_LF, ::testing::ValuesIn( Map_Del3_LF::get_load_factors()), get_test_parameter_name );
127127
#else
128-
INSTANTIATE_TEST_CASE_P( a, Map_Del3_LF, ::testing::ValuesIn( Map_Del3_LF::get_load_factors()) );
128+
INSTANTIATE_TEST_CASE_P( a, Map_Del3_LF, ::testing::ValuesIn( Map_Del3_LF::get_load_factors()));
129129
#endif
130130
} // namespace map

test/stress/map/delodd/map_delodd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ namespace map {
125125
}
126126
INSTANTIATE_TEST_CASE_P( a, Map_DelOdd_LF, ::testing::ValuesIn( Map_DelOdd_LF::get_load_factors()), get_test_parameter_name );
127127
#else
128-
INSTANTIATE_TEST_CASE_P( a, Map_DelOdd_LF, ::testing::ValuesIn( Map_DelOdd_LF::get_load_factors()) );
128+
INSTANTIATE_TEST_CASE_P( a, Map_DelOdd_LF, ::testing::ValuesIn( Map_DelOdd_LF::get_load_factors()));
129129
#endif
130130

131131
} // namespace map

test/stress/map/find_string/map_find_string.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ namespace map {
202202
}
203203
INSTANTIATE_TEST_CASE_P( a, Map_find_string_LF, ::testing::ValuesIn( Map_find_string::get_load_factors()), get_test_parameter_name );
204204
#else
205-
INSTANTIATE_TEST_CASE_P( a, Map_find_string_LF, ::testing::ValuesIn( Map_find_string::get_load_factors()) );
205+
INSTANTIATE_TEST_CASE_P( a, Map_find_string_LF, ::testing::ValuesIn( Map_find_string::get_load_factors()));
206206
#endif
207207

208208

test/stress/map/insdel_func/map_insdel_func.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ namespace map {
129129
}
130130
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors()), get_test_parameter_name );
131131
#else
132-
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors()) );
132+
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors()));
133133
#endif
134134

135135
} // namespace map

test/stress/map/insdel_item_int/map_insdel_item_int.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ namespace map {
114114
}
115115
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_item_int_LF, ::testing::ValuesIn( Map_InsDel_item_int_LF::get_load_factors()), get_test_parameter_name );
116116
#else
117-
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_item_int_LF, ::testing::ValuesIn( Map_InsDel_item_int_LF::get_load_factors()) );
117+
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_item_int_LF, ::testing::ValuesIn( Map_InsDel_item_int_LF::get_load_factors()));
118118
#endif
119119

120120
} // namespace map

test/stress/map/insdel_string/map_insdel_string.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ namespace map {
185185
}
186186
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors()), get_test_parameter_name );
187187
#else
188-
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors()) );
188+
INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors()));
189189
#endif
190190

191191
} // namespace map

0 commit comments

Comments
 (0)