diff --git a/thrust/benchmarks/bench/equal/basic.cu b/thrust/benchmarks/bench/equal/basic.cu index a88890e13f9..237f4ad7447 100644 --- a/thrust/benchmarks/bench/equal/basic.cu +++ b/thrust/benchmarks/bench/equal/basic.cu @@ -10,7 +10,6 @@ template static void benchmark(nvbench::state& state, nvbench::type_list) { - const auto& name = state.get_benchmark().get_name(); const auto elements = static_cast(state.get_int64("Elements")); thrust::device_vector a(elements, T{1}); thrust::device_vector b(elements, T{1}); @@ -21,12 +20,12 @@ static void benchmark(nvbench::state& state, nvbench::type_list) thrust::fill(policy(alloc), b.begin() + different_elems, b.end(), T{2}); state.add_element_count(elements); - state.add_global_memory_reads(std::max(2 * different_elems, std::size_t(1))); // using `different_elements` instead + state.add_global_memory_reads(2 * std::max(different_elems, std::size_t(1))); // using `different_elements` instead // of `elements` corresponds to the // actual elements read in an early // exit - state.exec(nvbench::exec_tag::no_batch | nvbench::exec_tag::sync, [&](nvbench::launch&) { - do_not_optimize(thrust::equal(policy(alloc), a.begin(), a.end(), b.begin())); + state.exec(nvbench::exec_tag::no_batch | nvbench::exec_tag::sync, [&](nvbench::launch& launch) { + do_not_optimize(thrust::equal(policy(alloc, launch), a.begin(), a.end(), b.begin())); }); }