File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
2826
2927#include < catch2/catch_template_test_macros.hpp>
3028
29+ #include < cstdint>
30+
3131using size_type = std::size_t ;
3232
3333template <typename Set>
@@ -104,9 +104,9 @@ TEMPLATE_TEST_CASE_SIG(
104104 // Expected sums are pre-computed per type class:
105105 // uint8_t (num_keys=100): sum of evens 0..98 = 2450, sum of odds 1..99 = 2500
106106 // uint16_t+ (num_keys=1000): sum of evens 0..998 = 249'500, sum of odds 1..999 = 250'000
107- constexpr size_type num_keys = (sizeof (Key) == 1 ) ? 100 : 1'000 ;
108- constexpr size_type expected_evens = (sizeof (Key) == 1 ) ? 2'450 : 249'500 ;
109- constexpr size_type expected_odds = (sizeof (Key) == 1 ) ? 2'500 : 250'000 ;
107+ constexpr size_type num_keys = (sizeof (Key) == 1 ) ? 100 : 1'000 ;
108+ constexpr size_type expected_evens = (sizeof (Key) == 1 ) ? 2'450 : 249'500 ;
109+ constexpr size_type expected_odds = (sizeof (Key) == 1 ) ? 2'500 : 250'000 ;
110110
111111 using probe = std::conditional_t <
112112 Probe == cuco::test::probe_sequence::linear_probing,
Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
2725
2826#include < catch2/catch_template_test_macros.hpp>
2927
28+ #include < cstdint>
29+
3030template <typename Set>
3131void test_insert_and_find (Set& set, std::size_t num_keys)
3232{
Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
2927
3028#include < catch2/catch_template_test_macros.hpp>
3129
30+ #include < cstdint>
31+
3232template <typename Set>
3333void test_unique_sequence (Set& set, std::size_t num_keys)
3434{
@@ -87,7 +87,7 @@ TEMPLATE_TEST_CASE_SIG(
8787)
8888{
8989 // Limit key count for small types: leave room for the 0xFF/0xFFFF sentinel
90- constexpr std::size_t num_keys = (sizeof (Key) == 1 ) ? 100 : 400 ;
90+ constexpr std::size_t num_keys = (sizeof (Key) == 1 ) ? 100 : 400 ;
9191 constexpr double desired_load_factor = 1 .;
9292
9393 using probe = std::conditional_t <Probe == cuco::test::probe_sequence::linear_probing,
Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
2927
3028#include < catch2/catch_template_test_macros.hpp>
3129
30+ #include < cstdint>
31+
3232using size_type = std::size_t ;
3333
3434template <class Container >
Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
3028
3129#include < catch2/catch_template_test_macros.hpp>
3230
31+ #include < cstdint>
32+
3333static constexpr int key_sentinel = -1 ;
3434
3535template <typename Set>
@@ -101,7 +101,7 @@ TEMPLATE_TEST_CASE_SIG(
101101)
102102{
103103 // Limit key count for small types: leave room for the 0xFF/0xFFFF sentinel
104- constexpr std::size_t num_keys = (sizeof (Key) == 1 ) ? 100 : 400 ;
104+ constexpr std::size_t num_keys = (sizeof (Key) == 1 ) ? 100 : 400 ;
105105 constexpr double desired_load_factor = 1 .;
106106
107107 using probe = std::conditional_t <Probe == cuco::test::probe_sequence::linear_probing,
Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
3028
3129#include < catch2/catch_template_test_macros.hpp>
3230
31+ #include < cstdint>
3332#include < limits>
3433
3534template <std::size_t ValidSize, typename Ref>
Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
3230
3331#include < catch2/catch_template_test_macros.hpp>
3432
33+ #include < cstdint>
34+
3535TEMPLATE_TEST_CASE_SIG (" static_set: operations on different stream than constructor" ,
3636 " " ,
3737 ((typename Key), Key),
@@ -52,15 +52,16 @@ TEMPLATE_TEST_CASE_SIG("static_set: operations on different stream than construc
5252
5353 { // Scope ensures set is destroyed before streams
5454 // Scale num_keys to fit in the key type's value range (sentinel = 0xFF/0xFFFF).
55- constexpr std::size_t num_keys =
56- (sizeof (Key) == 1 ) ? 100 : (sizeof (Key) == 2 ) ? 1'000 : 500'000 ;
57- auto set = cuco::static_set{num_keys * 2 ,
55+ constexpr std::size_t num_keys = (sizeof (Key) == 1 ) ? 100
56+ : (sizeof (Key) == 2 ) ? 1'000
57+ : 500'000 ;
58+ auto set = cuco::static_set{num_keys * 2 ,
5859 cuco::empty_key<Key>{static_cast <Key>(-1 )},
59- {},
60+ {},
6061 cuco::linear_probing<1 , cuco::default_hash_function<Key>>{},
61- {},
62- {},
63- {},
62+ {},
63+ {},
64+ {},
6465 constructor_stream};
6566
6667 thrust::device_vector<Key> d_keys (num_keys);
Original file line number Diff line number Diff line change 1616
1717#include < test_utils.hpp>
1818
19- #include < cstdint>
20-
2119#include < cuco/detail/__config>
2220#include < cuco/static_set.cuh>
2321
3129
3230#include < catch2/catch_template_test_macros.hpp>
3331
32+ #include < cstdint>
33+
3434using size_type = int32_t ;
3535
3636int32_t constexpr SENTINEL = -1 ;
You can’t perform that action at this time.
0 commit comments