`merge_by_key`: Correct the default comparator from `less<item_type>` to `less<key_type>`.
GitHub
Bug
Bug
git-commit
git-author Bryce Adelstein Lelbach aka wash
VDVS:
Jobs:
[git-p4: depot-paths = "//sw/gpgpu/thrust/": change = 24263105]
MODIFY
CHANGELOG
CHANGELOG
@@ -15,6 +15,7 @@ Bug Fixes
#878 Optimize min/max_element to only use `get_iterator_value` for non-numeric types.
#899 Make `pinned_allocator`'s comparison operators `const`.
2092152 Remove all includes of `<cuda.h>`.
+ #911 Fix default comparator element type for `merge_by_key`.
Acknowledgments
Thanks to Andrew Corrigan for contributing fixes for swapping interfaces.

MODIFY
thrust/system/cuda/detail/merge.h
thrust/system/cuda/detail/merge.h
@@ -999,7 +999,7 @@ merge_by_key(execution_policy<Derived> &policy,
KeysOutputIt keys_result,
ItemsOutputIt items_result)
{
- typedef typename thrust::iterator_value<ItemsIt1>::type items_type;
+ typedef typename thrust::iterator_value<KeysIt1>::type keys_type;
return cuda_cub::merge_by_key(policy,
keys1_first,
keys1_last,
@@ -1009,7 +1009,7 @@ merge_by_key(execution_policy<Derived> &policy,
items2_first,
keys_result,
items_result,
- thrust::less<items_type>());
+ thrust::less<keys_type>());
}

`merge_by_key`: Correct the default comparator from `less<item_type>` to `less<key_type>`.
GitHub #911
Bug 2166653
Bug 1865408
git-commit dfe393f9257c0aa17d3925b8fa61387e358585a3
git-author Bryce Adelstein Lelbach aka wash <brycelelbach@gmail.com>
VDVS: http://ausdvs.nvidia.com/Build_Results?virtualId=1000170251&which_page=current_build

Jobs: 1865408-2006 2166653-2006
[git-p4: depot-paths = "//sw/gpgpu/thrust/": change = 24263105]