Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent use of noexcept #511

Merged
merged 6 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/cuco/aow_storage.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class aow_storage : public detail::aow_storage_base<T, WindowSize, Extent> {
* @param size Number of windows to (de)allocate
* @param allocator Allocator used for (de)allocating device storage
*/
explicit constexpr aow_storage(Extent size, Allocator const& allocator = {}) noexcept;
explicit constexpr aow_storage(Extent size, Allocator const& allocator = {});

aow_storage(aow_storage&&) = default; ///< Move constructor
/**
Expand Down Expand Up @@ -122,7 +122,7 @@ class aow_storage : public detail::aow_storage_base<T, WindowSize, Extent> {
* @param key Key to which all keys in `slots` are initialized
* @param stream Stream used for executing the kernel
*/
void initialize(value_type key, cuda_stream_ref stream = {}) noexcept;
void initialize(value_type key, cuda_stream_ref stream = {});

/**
* @brief Asynchronously initializes each slot in the AoW storage to contain `key`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ constexpr void distinct_count_estimator<T, Scope, Hash, Allocator>::clear(
template <class T, cuda::thread_scope Scope, class Hash, class Allocator>
template <class InputIt>
constexpr void distinct_count_estimator<T, Scope, Hash, Allocator>::add_async(
InputIt first, InputIt last, cuco::cuda_stream_ref stream) noexcept
InputIt first, InputIt last, cuco::cuda_stream_ref stream)
{
this->impl_->add_async(first, last, stream);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class open_addressing_impl {
KeyEqual const& pred,
ProbingScheme const& probing_scheme,
Allocator const& alloc,
cuda_stream_ref stream) noexcept
cuda_stream_ref stream)
: empty_slot_sentinel_{empty_slot_sentinel},
erased_key_sentinel_{this->extract_key(empty_slot_sentinel)},
predicate_{pred},
Expand Down Expand Up @@ -233,7 +233,7 @@ class open_addressing_impl {
*
* @param stream CUDA stream this operation is executed in
*/
void clear(cuda_stream_ref stream) noexcept { storage_.initialize(empty_slot_sentinel_, stream); }
void clear(cuda_stream_ref stream) { storage_.initialize(empty_slot_sentinel_, stream); }

/**
* @brief Asynchronously erases all elements from the container. After this call, `size()` returns
Expand Down Expand Up @@ -599,7 +599,7 @@ class open_addressing_impl {
*
* @return The number of elements in the container
*/
[[nodiscard]] size_type size(cuda_stream_ref stream) const noexcept
[[nodiscard]] size_type size(cuda_stream_ref stream) const
{
auto counter =
detail::counter_storage<size_type, thread_scope, allocator_type>{this->allocator()};
Expand Down
6 changes: 3 additions & 3 deletions include/cuco/detail/static_map/static_map.inl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ template <class Key,
class Allocator,
class Storage>
void static_map<Key, T, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::clear(
cuda_stream_ref stream) noexcept
cuda_stream_ref stream)
{
impl_->clear(stream);
}
Expand Down Expand Up @@ -215,7 +215,7 @@ template <class Key,
class Storage>
template <typename InputIt>
void static_map<Key, T, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::
insert_or_assign(InputIt first, InputIt last, cuda_stream_ref stream) noexcept
insert_or_assign(InputIt first, InputIt last, cuda_stream_ref stream)
{
return this->insert_or_assign_async(first, last, stream);
stream.synchronize();
Expand Down Expand Up @@ -465,7 +465,7 @@ template <class Key,
class Storage>
static_map<Key, T, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::size_type
static_map<Key, T, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::size(
cuda_stream_ref stream) const noexcept
cuda_stream_ref stream) const
{
return impl_->size(stream);
}
Expand Down
4 changes: 2 additions & 2 deletions include/cuco/detail/static_multiset/static_multiset.inl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ template <class Key,
class Allocator,
class Storage>
void static_multiset<Key, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::clear(
cuda_stream_ref stream) noexcept
cuda_stream_ref stream)
{
impl_->clear(stream);
}
Expand Down Expand Up @@ -183,7 +183,7 @@ template <class Key,
class Storage>
static_multiset<Key, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::size_type
static_multiset<Key, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::size(
cuda_stream_ref stream) const noexcept
cuda_stream_ref stream) const
{
return impl_->size(stream);
}
Expand Down
4 changes: 2 additions & 2 deletions include/cuco/detail/static_set/static_set.inl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ template <class Key,
class Allocator,
class Storage>
void static_set<Key, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::clear(
cuda_stream_ref stream) noexcept
cuda_stream_ref stream)
{
impl_->clear(stream);
}
Expand Down Expand Up @@ -429,7 +429,7 @@ template <class Key,
class Storage>
static_set<Key, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::size_type
static_set<Key, Extent, Scope, KeyEqual, ProbingScheme, Allocator, Storage>::size(
cuda_stream_ref stream) const noexcept
cuda_stream_ref stream) const
{
return impl_->size(stream);
}
Expand Down
6 changes: 3 additions & 3 deletions include/cuco/detail/storage/aow_storage.inl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
namespace cuco {

template <typename T, int32_t WindowSize, typename Extent, typename Allocator>
constexpr aow_storage<T, WindowSize, Extent, Allocator>::aow_storage(
Extent size, Allocator const& allocator) noexcept
constexpr aow_storage<T, WindowSize, Extent, Allocator>::aow_storage(Extent size,
Allocator const& allocator)
: detail::aow_storage_base<T, WindowSize, Extent>{size},
allocator_{allocator},
window_deleter_{capacity(), allocator_},
Expand Down Expand Up @@ -64,7 +64,7 @@ aow_storage<T, WindowSize, Extent, Allocator>::ref() const noexcept

template <typename T, int32_t WindowSize, typename Extent, typename Allocator>
void aow_storage<T, WindowSize, Extent, Allocator>::initialize(value_type key,
cuda_stream_ref stream) noexcept
cuda_stream_ref stream)
{
this->initialize_async(key, stream);
stream.synchronize();
Expand Down
2 changes: 1 addition & 1 deletion include/cuco/distinct_count_estimator.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class distinct_count_estimator {
* @param stream CUDA stream this operation is executed in
*/
template <class InputIt>
constexpr void add_async(InputIt first, InputIt last, cuco::cuda_stream_ref stream = {}) noexcept;
constexpr void add_async(InputIt first, InputIt last, cuco::cuda_stream_ref stream = {});

/**
* @brief Adds to be counted items to the estimator.
Expand Down
6 changes: 3 additions & 3 deletions include/cuco/static_map.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class static_map {
*
* @param stream CUDA stream this operation is executed in
*/
void clear(cuda_stream_ref stream = {}) noexcept;
void clear(cuda_stream_ref stream = {});

/**
* @brief Asynchronously erases all elements from the container. After this call, `size()` returns
Expand Down Expand Up @@ -387,7 +387,7 @@ class static_map {
* @param stream CUDA stream used for insert
*/
template <typename InputIt>
void insert_or_assign(InputIt first, InputIt last, cuda_stream_ref stream = {}) noexcept;
void insert_or_assign(InputIt first, InputIt last, cuda_stream_ref stream = {});

/**
* @brief For any key-value pair `{k, v}` in the range `[first, last)`, if a key equivalent to `k`
Expand Down Expand Up @@ -690,7 +690,7 @@ class static_map {
* @param stream CUDA stream used to get the number of inserted elements
* @return The number of elements in the container
*/
[[nodiscard]] size_type size(cuda_stream_ref stream = {}) const noexcept;
[[nodiscard]] size_type size(cuda_stream_ref stream = {}) const;

/**
* @brief Gets the maximum number of elements the hash map can hold.
Expand Down
4 changes: 2 additions & 2 deletions include/cuco/static_multiset.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class static_multiset {
*
* @param stream CUDA stream this operation is executed in
*/
void clear(cuda_stream_ref stream = {}) noexcept;
void clear(cuda_stream_ref stream = {});

/**
* @brief Asynchronously erases all elements from the container. After this call, `size()` returns
Expand Down Expand Up @@ -339,7 +339,7 @@ class static_multiset {
* @param stream CUDA stream used to get the number of inserted elements
* @return The number of elements in the container
*/
[[nodiscard]] size_type size(cuda_stream_ref stream = {}) const noexcept;
[[nodiscard]] size_type size(cuda_stream_ref stream = {}) const;

/**
* @brief Gets the maximum number of elements the multiset can hold.
Expand Down
4 changes: 2 additions & 2 deletions include/cuco/static_set.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class static_set {
*
* @param stream CUDA stream this operation is executed in
*/
void clear(cuda_stream_ref stream = {}) noexcept;
void clear(cuda_stream_ref stream = {});

/**
* @brief Asynchronously erases all elements from the container. After this call, `size()` returns
Expand Down Expand Up @@ -687,7 +687,7 @@ class static_set {
* @param stream CUDA stream used to get the number of inserted elements
* @return The number of elements in the container
*/
[[nodiscard]] size_type size(cuda_stream_ref stream = {}) const noexcept;
[[nodiscard]] size_type size(cuda_stream_ref stream = {}) const;

/**
* @brief Gets the maximum number of elements the hash set can hold.
Expand Down
Loading