Skip to content

Commit

Permalink
Deprecate extent value() API
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Dec 5, 2023
1 parent a938675 commit f27f088
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
3 changes: 1 addition & 2 deletions include/cuco/detail/extent/extent.inl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ template <typename SizeType, std::size_t N>
struct window_extent {
using value_type = SizeType; ///< Extent value type

__host__ __device__ constexpr value_type value() const noexcept { return N; }
__host__ __device__ explicit constexpr operator value_type() const noexcept { return value(); }
__host__ __device__ explicit constexpr operator value_type() const noexcept { return N; }

private:
__host__ __device__ explicit constexpr window_extent() noexcept {}
Expand Down
7 changes: 0 additions & 7 deletions include/cuco/utility/fast_int.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ struct fast_int {
evaluate_magic_numbers();
}

/**
* @brief Get the underlying integer value.
*
* @return Underlying value
*/
__host__ __device__ constexpr value_type value() const noexcept { return value_; }

/**
* @brief Explicit conversion operator to the underlying value type.
*
Expand Down
4 changes: 2 additions & 2 deletions tests/utility/extent_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ TEMPLATE_TEST_CASE_SIG(
{
auto constexpr size = cuco::experimental::extent<SizeType, num>{};
auto constexpr res = cuco::experimental::make_window_extent<cg_size, window_size>(size);
STATIC_REQUIRE(gold_reference == res.value());
STATIC_REQUIRE(gold_reference == static_cast<SizeType>(res));
}

SECTION("Compute dynamic valid extent at run time.")
{
auto const size = cuco::experimental::extent<SizeType>{num};
auto const res = cuco::experimental::make_window_extent<cg_size, window_size>(size);
REQUIRE(gold_reference == res.value());
REQUIRE(gold_reference == static_cast<SizeType>(res));
}
}

0 comments on commit f27f088

Please sign in to comment.