From 72ebe59d128aed5b87d10f27924ceee920e66bbb Mon Sep 17 00:00:00 2001 From: Matthew Michel Date: Fri, 22 Mar 2024 10:08:30 -0500 Subject: [PATCH] Capture lambda args by value Signed-off-by: Matthew Michel --- include/oneapi/dpl/internal/binary_search_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/oneapi/dpl/internal/binary_search_impl.h b/include/oneapi/dpl/internal/binary_search_impl.h index 37502499d02..551c7cd0db3 100644 --- a/include/oneapi/dpl/internal/binary_search_impl.h +++ b/include/oneapi/dpl/internal/binary_search_impl.h @@ -230,7 +230,7 @@ binary_search_impl(__internal::__hetero_tag<_BackendTag>, Policy&& policy, Input auto keep_result = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read_write, OutputIterator>(); auto result_buf = keep_result(result, result + value_size); auto zip_vw = make_zip_view(input_buf.all_view(), value_buf.all_view(), result_buf.all_view()); - auto run_binary_search = [&comp, &value_size, &zip_vw](auto&& policy, auto size) { + auto run_binary_search = [comp, value_size, zip_vw](auto&& policy, auto size) { __bknd::__parallel_for( _BackendTag{}, ::std::forward(policy), custom_brick{comp, size}, value_size,