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

Store and set the correct CUDA device in device_buffer #1370

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Don't document hidden friends to try to work around Breathe bug.
  • Loading branch information
harrism committed Nov 14, 2023
commit 34bbfde9e252222192b2c0719e3518a95c49b6d8
10 changes: 6 additions & 4 deletions include/rmm/cuda_device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,29 @@ struct cuda_device_id {
/// @briefreturn{The wrapped integer value}
[[nodiscard]] constexpr value_type value() const noexcept { return id_; }

/**
// TODO re-add doxygen comment specifier /** for these hidden friend operators once this Breathe
// bug is fixed: https://github.com/breathe-doc/breathe/issues/916
/*
* @brief Compare two `cuda_device_id`s for equality.
*
* @param lhs The first `cuda_device_id` to compare.
* @param rhs The second `cuda_device_id` to compare.
* @return true if the two `cuda_device_id`s wrap the same integer value, false otherwise.
*/
[[nodiscard]] friend constexpr bool operator==(cuda_device_id const& lhs,
[[nodiscard]] constexpr friend bool operator==(cuda_device_id const& lhs,
cuda_device_id const& rhs) noexcept
{
return lhs.value() == rhs.value();
}

/**
/*
* @brief Compare two `cuda_device_id`s for inequality.
*
* @param lhs The first `cuda_device_id` to compare.
* @param rhs The second `cuda_device_id` to compare.
* @return true if the two `cuda_device_id`s wrap different integer values, false otherwise.
*/
[[nodiscard]] friend constexpr bool operator!=(cuda_device_id const& lhs,
[[nodiscard]] constexpr friend bool operator!=(cuda_device_id const& lhs,
cuda_device_id const& rhs) noexcept
{
return lhs.value() != rhs.value();
Expand Down