Skip to content

Commit 40915c7

Browse files
authored
Fix CCCL 3.2 mdspan constexpr issues (#2911)
This PR reverts some code that was needed to work around a `constexpr` bug in CCCL 3.2, now that it has been fixed and updated in rapids-cmake: rapidsai/rapids-cmake#959 Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Divye Gala (https://github.com/divyegala) URL: #2911
1 parent f0fec52 commit 40915c7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cpp/tests/core/mdarray.cu

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -401,8 +401,7 @@ template <typename T, typename Index, typename LayoutPolicy>
401401
void check_matrix_layout(device_matrix_view<T, Index, LayoutPolicy> in)
402402
{
403403
static_assert(in.rank() == 2);
404-
// is_exhaustive() is not constexpr for dynamic extents in CCCL 3.2+
405-
EXPECT_TRUE(in.is_exhaustive());
404+
static_assert(in.is_exhaustive());
406405

407406
bool constexpr kIsCContiguous = std::is_same_v<LayoutPolicy, layout_c_contiguous>;
408407
bool constexpr kIsFContiguous = std::is_same_v<LayoutPolicy, layout_f_contiguous>;
@@ -425,7 +424,7 @@ TEST(MDArray, FuncArg)
425424

426425
auto slice =
427426
cuda::std::submdspan(d_matrix.view(), cuda::std::tuple{2ul, 4ul}, cuda::std::tuple{2ul, 5ul});
428-
ASSERT_TRUE(slice.is_strided());
427+
static_assert(slice.is_strided());
429428
ASSERT_EQ(slice.extent(0), 2);
430429
ASSERT_EQ(slice.extent(1), 3);
431430
// is using device_accessor mixin.

0 commit comments

Comments
 (0)