From f426360c4a91af3f80d15c284af9f74a00707aa4 Mon Sep 17 00:00:00 2001 From: Hugo Linsenmaier Date: Thu, 14 Jul 2022 03:11:49 -0700 Subject: [PATCH 1/3] Fix type check --- cpp/include/raft/detail/mdarray.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/include/raft/detail/mdarray.hpp b/cpp/include/raft/detail/mdarray.hpp index 215487c82f..d270b3f3c4 100644 --- a/cpp/include/raft/detail/mdarray.hpp +++ b/cpp/include/raft/detail/mdarray.hpp @@ -329,8 +329,11 @@ MDSPAN_INLINE_FUNCTION auto unravel_index_impl(I idx, stdex::extents * put it as the last nameless template parameter of a function: * `typename = ensure_integral_extents` */ +/* template using ensure_integral_extents = std::enable_if_t<(true && ... && std::is_integral_v), void>; - + */ +template +using ensure_integral_extents = std::enable_if_t>; } // namespace raft::detail From 3f32f7933ecd7089006b8132b912d73639ca29c5 Mon Sep 17 00:00:00 2001 From: Hugo Linsenmaier Date: Thu, 14 Jul 2022 03:29:23 -0700 Subject: [PATCH 2/3] Remove comment --- cpp/include/raft/detail/mdarray.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cpp/include/raft/detail/mdarray.hpp b/cpp/include/raft/detail/mdarray.hpp index d270b3f3c4..c7bcb7da4e 100644 --- a/cpp/include/raft/detail/mdarray.hpp +++ b/cpp/include/raft/detail/mdarray.hpp @@ -329,11 +329,6 @@ MDSPAN_INLINE_FUNCTION auto unravel_index_impl(I idx, stdex::extents * put it as the last nameless template parameter of a function: * `typename = ensure_integral_extents` */ -/* -template -using ensure_integral_extents = - std::enable_if_t<(true && ... && std::is_integral_v), void>; - */ template using ensure_integral_extents = std::enable_if_t>; } // namespace raft::detail From f2630e7f020e99573dba3c641154d65acfd37a12 Mon Sep 17 00:00:00 2001 From: Hugo Linsenmaier Date: Thu, 14 Jul 2022 06:47:08 -0700 Subject: [PATCH 3/3] Use conjunction --- cpp/include/raft/detail/mdarray.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/include/raft/detail/mdarray.hpp b/cpp/include/raft/detail/mdarray.hpp index c7bcb7da4e..e2ab07d75c 100644 --- a/cpp/include/raft/detail/mdarray.hpp +++ b/cpp/include/raft/detail/mdarray.hpp @@ -330,5 +330,6 @@ MDSPAN_INLINE_FUNCTION auto unravel_index_impl(I idx, stdex::extents * `typename = ensure_integral_extents` */ template -using ensure_integral_extents = std::enable_if_t>; +using ensure_integral_extents = std::enable_if_t...>>; + } // namespace raft::detail