From fbdf277cac33976b2c1f945e71c4fb9a7b01f659 Mon Sep 17 00:00:00 2001 From: James Reinders Date: Mon, 2 Dec 2024 11:33:41 -0800 Subject: [PATCH] Update histogram_10_6th_safe_parallel_private.cpp fix by ref --- .../synchronization/histogram_10_6th_safe_parallel_private.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new_examples/synchronization/histogram_10_6th_safe_parallel_private.cpp b/new_examples/synchronization/histogram_10_6th_safe_parallel_private.cpp index b2be74d170..763a3d0b58 100644 --- a/new_examples/synchronization/histogram_10_6th_safe_parallel_private.cpp +++ b/new_examples/synchronization/histogram_10_6th_safe_parallel_private.cpp @@ -63,7 +63,7 @@ int main(int argc, char** argv) { }); //Sequential reduction of the private histograms vector_t hist_p(num_bins); - priv_h.combine_each([&](vector_t a) + priv_h.combine_each([&](vector_t& a) { // for each priv histogram a std::transform(hist_p.begin(), // source 1 begin hist_p.end(), // source 1 end