From 760eda4e01b282499d0e1bacc688f9c34ccef83d Mon Sep 17 00:00:00 2001 From: Jakub Szuppe Date: Fri, 2 Dec 2016 20:13:05 +0100 Subject: [PATCH] Fix merge_sort_on_gpu() --- include/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp b/include/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp index e62c6beb..2acef1e5 100644 --- a/include/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp +++ b/include/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp @@ -418,7 +418,7 @@ inline void merge_blocks_on_gpu(KeyIterator keys_first, ");\n" << "left_idx = equal ? mid_idx + 1 : left_idx + 1;\n" << "right_idx = equal ? right_idx : mid_idx;\n" << - "upper_key = equal ? upper_key : " << + "upper_key = " << keys_first[k.var("left_idx")] << ";\n" << "}\n" << "}\n" <<