From aadcb55c24bf4af348aa027347c08be2517b075c Mon Sep 17 00:00:00 2001 From: James Reinders Date: Mon, 2 Dec 2024 11:47:11 -0800 Subject: [PATCH] Update histogram_12_8th_safe_parallel_combine.cpp pass by ref --- .../synchronization/histogram_12_8th_safe_parallel_combine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new_examples/synchronization/histogram_12_8th_safe_parallel_combine.cpp b/new_examples/synchronization/histogram_12_8th_safe_parallel_combine.cpp index fc6c9a9d35..eb24ce3045 100644 --- a/new_examples/synchronization/histogram_12_8th_safe_parallel_combine.cpp +++ b/new_examples/synchronization/histogram_12_8th_safe_parallel_combine.cpp @@ -62,7 +62,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