Skip to content

Commit c620ce3

Browse files
authored
Rename sentinel.cuh -> types.cuh (#452)
This PR renames `include/cuco/sentinel.cuh` to `include/cuco/types.cuh` as preparation work for #429. The goal is to have a single header containing all strong types used across cuco. Note: Apparently Doxygen has become even pickier. I had to add some more inline docs to headers which we haven't touched in a while to get the pre-commit test to pass.
1 parent 0ae4c0e commit c620ce3

13 files changed

Lines changed: 57 additions & 21 deletions

include/cuco/dynamic_map.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
#include <cuco/detail/dynamic_map_kernels.cuh>
2020
#include <cuco/hash_functions.cuh>
21-
#include <cuco/sentinel.cuh>
2221
#include <cuco/static_map.cuh>
22+
#include <cuco/types.cuh>
2323

2424
#include <thrust/device_vector.h>
2525
#include <thrust/functional.h>

include/cuco/operator.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,37 @@ inline namespace op {
2424
* @brief `insert` operator tag
2525
*/
2626
struct insert_tag {
27-
} inline constexpr insert;
27+
} inline constexpr insert; ///< `cuco::insert` operator
2828

2929
/**
3030
* @brief `insert_and_find` operator tag
3131
*/
3232
struct insert_and_find_tag {
33-
} inline constexpr insert_and_find;
33+
} inline constexpr insert_and_find; ///< `cuco::insert_and_find` operator
3434

3535
/**
3636
* @brief `insert_or_assign` operator tag
3737
*/
3838
struct insert_or_assign_tag {
39-
} inline constexpr insert_or_assign;
39+
} inline constexpr insert_or_assign; ///< `cuco::insert_or_assign` operator
4040

4141
/**
4242
* @brief `erase` operator tag
4343
*/
4444
struct erase_tag {
45-
} inline constexpr erase;
45+
} inline constexpr erase; ///< `cuco::erase` operator
4646

4747
/**
4848
* @brief `contains` operator tag
4949
*/
5050
struct contains_tag {
51-
} inline constexpr contains;
51+
} inline constexpr contains; ///< `cuco::contains` operator
5252

5353
/**
5454
* @brief `find` operator tag
5555
*/
5656
struct find_tag {
57-
} inline constexpr find;
57+
} inline constexpr find; ///< `cuco::find` operator
5858

5959
} // namespace op
6060
} // namespace cuco

include/cuco/static_map.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include <cuco/detail/static_map_kernels.cuh>
2323
#include <cuco/hash_functions.cuh>
2424
#include <cuco/pair.cuh>
25-
#include <cuco/sentinel.cuh>
2625
#include <cuco/static_map_ref.cuh>
26+
#include <cuco/types.cuh>
2727
#include <cuco/utility/allocator.hpp>
2828
#include <cuco/utility/cuda_thread_scope.cuh>
2929
#include <cuco/utility/traits.hpp>

include/cuco/static_map_ref.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include <cuco/hash_functions.cuh>
2121
#include <cuco/operator.hpp>
2222
#include <cuco/probing_scheme.cuh>
23-
#include <cuco/sentinel.cuh>
2423
#include <cuco/storage.cuh>
24+
#include <cuco/types.cuh>
2525
#include <cuco/utility/cuda_thread_scope.cuh>
2626

2727
#include <cuda/std/atomic>

include/cuco/static_multimap.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <cuco/detail/prime.hpp>
2121
#include <cuco/hash_functions.cuh>
2222
#include <cuco/probe_sequences.cuh>
23-
#include <cuco/sentinel.cuh>
23+
#include <cuco/types.cuh>
2424
#include <cuco/utility/allocator.hpp>
2525
#include <cuco/utility/traits.hpp>
2626

include/cuco/static_multiset.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
#include <cuco/extent.cuh>
2222
#include <cuco/hash_functions.cuh>
2323
#include <cuco/probing_scheme.cuh>
24-
#include <cuco/sentinel.cuh>
2524
#include <cuco/static_multiset_ref.cuh>
2625
#include <cuco/storage.cuh>
26+
#include <cuco/types.cuh>
2727
#include <cuco/utility/allocator.hpp>
2828
#include <cuco/utility/cuda_thread_scope.cuh>
2929
#include <cuco/utility/traits.hpp>

include/cuco/static_multiset_ref.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include <cuco/hash_functions.cuh>
2121
#include <cuco/operator.hpp>
2222
#include <cuco/probing_scheme.cuh>
23-
#include <cuco/sentinel.cuh>
2423
#include <cuco/storage.cuh>
24+
#include <cuco/types.cuh>
2525
#include <cuco/utility/cuda_thread_scope.cuh>
2626

2727
#include <cuda/std/atomic>

include/cuco/static_set.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
#include <cuco/extent.cuh>
2222
#include <cuco/hash_functions.cuh>
2323
#include <cuco/probing_scheme.cuh>
24-
#include <cuco/sentinel.cuh>
2524
#include <cuco/static_set_ref.cuh>
2625
#include <cuco/storage.cuh>
26+
#include <cuco/types.cuh>
2727
#include <cuco/utility/allocator.hpp>
2828
#include <cuco/utility/cuda_thread_scope.cuh>
2929
#include <cuco/utility/traits.hpp>

include/cuco/static_set_ref.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include <cuco/hash_functions.cuh>
2121
#include <cuco/operator.hpp>
2222
#include <cuco/probing_scheme.cuh>
23-
#include <cuco/sentinel.cuh>
2423
#include <cuco/storage.cuh>
24+
#include <cuco/types.cuh>
2525
#include <cuco/utility/cuda_thread_scope.cuh>
2626

2727
#include <cuda/std/atomic>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818

1919
#include <cuco/detail/utility/strong_type.cuh>
2020

21+
/**
22+
* @brief Defines various strong type wrappers used across this library.
23+
*
24+
* @note Each strong type inherits from `cuco::detail::strong_type<T>`. `CUCO_DEFINE_STRONG_TYPE`
25+
* and `CUCO_DEFINE_TEMPLATE_STRONG_TYPE` are convenience macros used to define a named type in a
26+
* single line, e.g., `CUCO_DEFINE_STRONG_TYPE(foo, double)` defines `struct foo : public
27+
* cuco::detail::strong_type<double> {...};`, where `cuco::foo{42.0}` is implicitly convertible to
28+
* `double{42.0}`.
29+
*/
30+
2131
namespace cuco {
2232
/**
2333
* @brief A strong type wrapper `cuco::empty_key<Key>` used to denote the empty key sentinel.

0 commit comments

Comments
 (0)