Skip to content
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
5 changes: 3 additions & 2 deletions cub/test/catch2_test_device_for_api.cu
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ CUB_TEST("DeviceFor::ForEachInExtents two-phase size-query is unambiguous", "[fo
{
void* d_temp_storage = nullptr;
size_t temp_storage_bytes = 0;
cuda::std::extents<int, 0> extents{};
const cuda::std::extents<int, 0> extents{}; // NOLINT(misc-const-correctness)

REQUIRE(
cudaSuccess == cub::DeviceFor::ForEachInExtents(d_temp_storage, temp_storage_bytes, extents, noop_extents_t{}));
Expand All @@ -456,7 +456,8 @@ CUB_TEST("DeviceFor::ForEachInLayout two-phase size-query is unambiguous", "[for
// built. Reaches the compute path, unlike the size-query guards above.
CUB_TEST("DeviceFor::ForEachInExtents handles an empty extent", "[for][device]", CUB_SMALL)
{
cuda::std::extents<int, cuda::std::dynamic_extent> extents{0};
// NOLINTNEXTLINE(misc-const-correctness)
const cuda::std::extents<int, cuda::std::dynamic_extent> extents{0};

REQUIRE(cudaSuccess == cub::DeviceFor::ForEachInExtents(extents, noop_extents_t{}));
}
8 changes: 4 additions & 4 deletions cub/test/catch2_test_device_for_env.cu
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static_assert(cuda::std::__is_callable_v<cuda::get_stream_t, const non_copyable_
template <class TestFn>
void test_env_kinds(TestFn test_fn)
{
cuda::stream stream = make_current_device_stream();
const cuda::stream stream = make_current_device_stream();
const auto default_stream = cuda::stream_ref{cudaStream_t{}};

SECTION("default environment")
Expand Down Expand Up @@ -197,7 +197,7 @@ void test_env_kinds(TestFn test_fn)

SECTION("non-copyable wrapper convertible to cudaStream_t")
{
non_copyable_stream_wrapper wrapper{stream.get()};
const non_copyable_stream_wrapper wrapper{stream.get()};
test_fn(wrapper, cuda::stream_ref{stream});
}

Expand Down Expand Up @@ -286,7 +286,7 @@ struct stream_capture_guard
template <class LaunchFn>
void test_env_stream_routing(LaunchFn launch)
{
cuda::stream stream = make_current_device_stream();
const cuda::stream stream = make_current_device_stream();

// allocation is not capturable, so everything the launches touch is set up before capture begins
c2h::device_vector<int> vec(coords_extents{}.extent(0) * coords_extents{}.extent(1), 1);
Expand Down Expand Up @@ -323,7 +323,7 @@ void test_env_stream_routing(LaunchFn launch)

SECTION("non-copyable wrapper convertible to cudaStream_t")
{
non_copyable_stream_wrapper wrapper{stream.get()};
const non_copyable_stream_wrapper wrapper{stream.get()};
launch(args, wrapper);
}

Expand Down
4 changes: 2 additions & 2 deletions libcudacxx/include/cuda/std/__charconv/from_chars.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ from_chars(const char* __first, const char* __last, _Tp& __value, int __base = 1

if constexpr (is_signed_v<_Tp>)
{
bool __neg = (__first < __last && *__first == '-');
__ret = ::cuda::std::__from_chars_int_generic(__first + __neg, __last, __result, __base);
const bool __neg = (__first < __last && *__first == '-');
__ret = ::cuda::std::__from_chars_int_generic(__first + __neg, __last, __result, __base);
if (__ret.ec == errc{})
{
const auto __max = ::cuda::uabs((__neg) ? numeric_limits<_Tp>::min() : numeric_limits<_Tp>::max());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ C2H_TEST_LIST(
if constexpr (sizeof(TestType) != 1)
{
constexpr size_t max_element_count = static_cast<size_t>(-1) / sizeof(TestType);
cuda::stream new_stream{cuda::device_ref{0}};
const cuda::stream new_stream{cuda::device_ref{0}};

REQUIRE_THROWS_MATCHES(
(buf.__replace_allocation(new_stream, max_element_count + 1)),
Expand Down
Loading