20 #ifndef RAJA_sort_sequential_HPP
21 #define RAJA_sort_sequential_HPP
23 #include "RAJA/config.hpp"
55 template<
typename... Args>
68 template<
typename... Args>
80 template<
typename ExecPolicy,
typename Iter,
typename Compare>
81 concepts::enable_if_t<resources::EventProxy<resources::Host>,
91 return resources::EventProxy<resources::Host>(host_res);
97 template<
typename ExecPolicy,
typename Iter,
typename Compare>
98 concepts::enable_if_t<resources::EventProxy<resources::Host>,
108 return resources::EventProxy<resources::Host>(host_res);
118 concepts::enable_if_t<resources::EventProxy<resources::Host>,
127 auto begin =
RAJA::zip(keys_begin, vals_begin);
128 auto end =
RAJA::zip(keys_end, vals_begin + (keys_end - keys_begin));
132 return resources::EventProxy<resources::Host>(host_res);
143 concepts::enable_if_t<resources::EventProxy<resources::Host>,
152 auto begin =
RAJA::zip(keys_begin, vals_begin);
153 auto end =
RAJA::zip(keys_end, vals_begin + (keys_end - keys_begin));
157 return resources::EventProxy<resources::Host>(host_res);
Header file for RAJA concept definitions.
Header file for common RAJA internal macro definitions.
Args args
Definition: WorkRunner.hpp:212
typename ::std::iterator_traits< Iter >::reference IterRef
Definition: algorithm.hpp:41
RAJA_INLINE void merge_sort(Iter begin, Iter end, Compare comp)
stable merge sort given range inplace using comparison function and using O(N*lg(N)) comparisons and ...
Definition: sort.hpp:579
RAJA_HOST_DEVICE void intro_sort(Iter begin, Iter end, Compare comp)
unstable intro sort given range inplace using comparison function and using O(N*lg(N)) comparisons an...
Definition: sort.hpp:417
concepts::enable_if_t< resources::EventProxy< resources::Host >, type_traits::is_openmp_policy< ExecPolicy > > stable_pairs(resources::Host host_res, const ExecPolicy &, KeyIter keys_begin, KeyIter keys_end, ValIter vals_begin, Compare comp)
Definition: sort.hpp:276
concepts::enable_if_t< resources::EventProxy< resources::Host >, type_traits::is_openmp_policy< ExecPolicy > > stable(resources::Host host_res, const ExecPolicy &, Iter begin, Iter end, Compare comp)
stable sort given range using comparison function
Definition: sort.hpp:230
concepts::enable_if_t< resources::EventProxy< resources::Host >, type_traits::is_openmp_policy< ExecPolicy > > unstable(resources::Host host_res, const ExecPolicy &, Iter begin, Iter end, Compare comp)
sort given range using comparison function
Definition: sort.hpp:213
concepts::enable_if_t< resources::EventProxy< resources::Host >, type_traits::is_openmp_policy< ExecPolicy > > unstable_pairs(resources::Host host_res, const ExecPolicy &, KeyIter keys_begin, KeyIter keys_end, ValIter vals_begin, Compare comp)
sort given range of pairs using comparison function on keys
Definition: sort.hpp:250
concepts::enable_if_t< resources::EventProxy< Res >, type_traits::is_execution_policy< ExecPolicy >, type_traits::is_resource< Res >, std::is_constructible< camp::resources::Resource, Res >, type_traits::is_range< Container > > sort(ExecPolicy &&p, Res r, Container &&c, Compare comp=Compare {})
sort execution pattern
Definition: sort.hpp:61
Definition: AlignedRangeIndexSetBuilders.cpp:35
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto zip(Args &&... args) -> ZipIterator< camp::decay< Args >... >
Zip multiple iterators together to iterate them simultaneously with a single ZipIterator object.
Definition: zip.hpp:242
Header file containing RAJA sequential policy definitions.
Functional that performs a stable sort with the given arguments, calls RAJA::merge_sort.
Definition: sort.hpp:67
RAJA_INLINE void operator()(Args &&... args) const
Definition: sort.hpp:69
Functional that performs an unstable sort with the given arguments, uses RAJA::intro_sort.
Definition: sort.hpp:54
RAJA_INLINE void operator()(Args &&... args) const
Definition: sort.hpp:56
Definition: IndexSet.hpp:70
Definition: PolicyBase.hpp:207
Tuple used by ZipIterator for storing multiple references and values. Acts like a reference to its me...
Definition: zip_tuple.hpp:247
Header file providing RAJA sort templates.
Header file for multi-iterator Zip Views.