...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::merge
// In header: <boost/compute/algorithm/merge.hpp> template<typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Compare> OutputIterator merge(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp, command_queue & queue = system::default_queue()); template<typename InputIterator1, typename InputIterator2, typename OutputIterator> OutputIterator merge(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, command_queue & queue = system::default_queue());
Merges the sorted values in the range [first1
, last1
) with the sorted values in the range [first2
, last2) and stores the result in the range beginning at result
. Values are compared using the comp
function. If no comparision function is given, less
is used.
Space complexity: \Omega(distance(first1
, last1
) + distance(first2
, last2
))
See Also:
inplace_merge()
Parameters: |
|
||||||||||||||
Returns: |
|