diff --git a/cub/cub/agent/agent_three_way_partition.cuh b/cub/cub/agent/agent_three_way_partition.cuh index 6d81fdb514a..1ec55372efb 100644 --- a/cub/cub/agent/agent_three_way_partition.cuh +++ b/cub/cub/agent/agent_three_way_partition.cuh @@ -95,16 +95,17 @@ struct accumulator_pack_base_t struct accumulator_pack_t : accumulator_pack_base_t { - using typename accumulator_pack_base_t::pack_t; + using base = accumulator_pack_base_t; + using typename base::pack_t; __device__ static void subtract(pack_t &packed, OffsetT val) { - packed = pack(first(packed) - val, second(packed) - val); + packed = base::pack( base::first(packed) - val, base::second(packed) - val); } __device__ static OffsetT sum(pack_t &packed) { - return first(packed) + second(packed); + return base::first(packed) + base::second(packed); } __device__ static pack_t zero() @@ -131,7 +132,7 @@ struct AgentThreeWayPartitionPolicy constexpr static CacheLoadModifier LOAD_MODIFIER = _LOAD_MODIFIER; constexpr static BlockScanAlgorithm SCAN_ALGORITHM = _SCAN_ALGORITHM; - struct detail + struct detail { using delay_constructor_t = DelayConstructorT; }; diff --git a/cub/test/catch2_test_debug.cu b/cub/test/catch2_test_debug.cu index 12771934db4..ed529b25383 100644 --- a/cub/test/catch2_test_debug.cu +++ b/cub/test/catch2_test_debug.cu @@ -32,6 +32,7 @@ TEST_CASE("CubDebug resets last error", "[debug][utils]") cub::EmptyKernel<<<0, 0>>>(); cudaError error = cudaPeekAtLastError(); + REQUIRE( error != cudaSuccess ); REQUIRE( CubDebug(cudaSuccess) != cudaSuccess ); REQUIRE( CubDebug(cudaSuccess) == cudaSuccess ); } diff --git a/cub/test/catch2_test_device_scan_iterators.cu b/cub/test/catch2_test_device_scan_iterators.cu index d0d37df52b1..bfc0ee8487d 100644 --- a/cub/test/catch2_test_device_scan_iterators.cu +++ b/cub/test/catch2_test_device_scan_iterators.cu @@ -302,8 +302,8 @@ CUB_TEST("Device scan works complex accumulator types", "[scan][device]") custom_accumulator_t init{}; - thrust::device_vector d_input(num_items, custom_input_t{1}); - thrust::device_vector d_output{num_items, custom_output_t{nullptr, 0}}; + thrust::device_vector d_input(static_cast(num_items), custom_input_t{1}); + thrust::device_vector d_output{static_cast(num_items), custom_output_t{nullptr, 0}}; thrust::device_vector d_ok_count(1); auto index_it = thrust::make_counting_iterator(0);