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

Bump rapids-cmake version #502

Merged
merged 6 commits into from
Jun 24, 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 CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
cmake_minimum_required(VERSION 3.23.1 FATAL_ERROR)

if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUCO_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.08/RAPIDS.cmake
${CMAKE_CURRENT_BINARY_DIR}/CUCO_RAPIDS.cmake)
endif()
include(${CMAKE_CURRENT_BINARY_DIR}/CUCO_RAPIDS.cmake)
Expand Down
3 changes: 2 additions & 1 deletion include/cuco/detail/hyperloglog/finalizer.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <cuco/detail/hyperloglog/tuning.cuh>

#include <cuda/functional>
#include <cuda/std/cmath>
#include <cuda/std/limits>

Expand Down Expand Up @@ -161,4 +162,4 @@ class finalizer {
int precision_;
int m_;
};
} // namespace cuco::hyperloglog_ns::detail
} // namespace cuco::hyperloglog_ns::detail
2 changes: 1 addition & 1 deletion include/cuco/detail/open_addressing/functors.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct slot_is_filled {
auto const key = [&]() {
if constexpr (HasPayload) {
// required by thrust zip iterator in `retrieve_all`
if constexpr (cuco::detail::is_thrust_pair_like<S>::value) {
if constexpr (cuco::detail::is_cuda_std_pair_like<S>::value) {
return thrust::get<0>(slot);
} else {
return slot.first;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,6 @@ class open_addressing_ref_impl {
if constexpr (cuco::detail::is_cuda_std_pair_like<T>::value) {
return cuco::pair{cuda::std::get<0>(value),
static_cast<mapped_type>(cuda::std::get<1>(value))};
} else if constexpr (cuco::detail::is_thrust_pair_like<T>::value) {
return cuco::pair{thrust::get<0>(value), static_cast<mapped_type>(thrust::get<1>(value))};
} else {
// hail mary (convert using .first/.second members)
return cuco::pair{thrust::raw_reference_cast(value.first),
Expand Down
28 changes: 8 additions & 20 deletions include/cuco/detail/pair/traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <cuda/std/tuple>
#include <cuda/std/type_traits>
#include <thrust/device_reference.h>
#include <thrust/tuple.h>

#include <tuple>

Expand All @@ -35,32 +34,21 @@ struct is_std_pair_like<T,
conditional_t<std::tuple_size<T>::value == 2, cuda::std::true_type, cuda::std::false_type> {};

template <typename T, typename = void>
struct is_cuda_std_pair_like : cuda::std::false_type {};
struct is_cuda_std_pair_like_impl : cuda::std::false_type {};

template <typename T>
struct is_cuda_std_pair_like<T,
cuda::std::void_t<decltype(cuda::std::get<0>(cuda::std::declval<T>())),
decltype(cuda::std::get<1>(cuda::std::declval<T>())),
decltype(cuda::std::tuple_size<T>::value)>>
struct is_cuda_std_pair_like_impl<
T,
cuda::std::void_t<decltype(cuda::std::get<0>(cuda::std::declval<T>())),
decltype(cuda::std::get<1>(cuda::std::declval<T>())),
decltype(cuda::std::tuple_size<T>::value)>>
: cuda::std::conditional_t<cuda::std::tuple_size<T>::value == 2,
cuda::std::true_type,
cuda::std::false_type> {};

template <typename T, typename = void>
struct is_thrust_pair_like_impl : cuda::std::false_type {};

template <typename T>
struct is_thrust_pair_like_impl<T,
cuda::std::void_t<decltype(thrust::get<0>(cuda::std::declval<T>())),
decltype(thrust::get<1>(cuda::std::declval<T>())),
decltype(thrust::tuple_size<T>::value)>>
: cuda::std::conditional_t<thrust::tuple_size<T>::value == 2,
cuda::std::true_type,
cuda::std::false_type> {};

template <typename T>
struct is_thrust_pair_like
: is_thrust_pair_like_impl<cuda::std::remove_reference_t<decltype(thrust::raw_reference_cast(
struct is_cuda_std_pair_like
: is_cuda_std_pair_like_impl<cuda::std::remove_reference_t<decltype(thrust::raw_reference_cast(
cuda::std::declval<T>()))>> {};

} // namespace cuco::detail
14 changes: 0 additions & 14 deletions include/cuco/pair.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,6 @@ struct alignas(detail::pair_alignment<First, Second>()) pair {
{
}

/**
* @brief Constructs a pair from the given thrust::pair-like `p`.
*
* @tparam T Type of the pair to copy from
*
* @param p The input pair to copy from
*/
template <typename T, std::enable_if_t<detail::is_thrust_pair_like<T>::value>* = nullptr>
__host__ __device__ constexpr pair(T const& p)
: pair{thrust::get<0>(thrust::raw_reference_cast(p)),
thrust::get<1>(thrust::raw_reference_cast(p))}
{
}

First first; ///< The first value in the pair
Second second; ///< The second value in the pair
};
Expand Down
Loading