hpx/parallel/util/range.hpp
hpx/parallel/util/range.hpp#
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
-
namespace parallel
-
namespace util
Typedefs
Functions
-
template<typename Iter, typename Sent>
range<Iter, Sent> concat(range<Iter, Sent> const &it1, range<Iter, Sent> const &it2)# concatenate two contiguous ranges
- Parameters
it1 – [in] : first range
it2 – [in] : second range
- Returns
range resulting of the concatenation
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2>
inline range<Iter2, Iter2> init_move(range<Iter2, Sent2> const &dest, range<Iter1, Sent1> const &src)# Move objects from the range src to dest.
- Parameters
dest – [in] : range where move the objects
src – [in] : range from where move the objects
- Returns
range with the objects moved and the size adjusted
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2>
inline range<Iter2, Sent2> uninit_move(range<Iter2, Sent2> const &dest, range<Iter1, Sent1> const &src)# Move objects from the range src creating them in dest.
- Parameters
dest – [in] : range where move and create the objects
src – [in] : range from where move the objects
- Returns
range with the objects moved and the size adjusted
-
template<typename Iter, typename Sent>
inline void destroy_range(range<Iter, Sent> r)# destroy a range of objects
- Parameters
r – [in] : range to destroy
-
template<typename Iter, typename Sent>
inline range<Iter, Sent> init(range<Iter, Sent> const &r, typename std::iterator_traits<Iter>::value_type &val)# initialize a range of objects with the object val moving across them
- Parameters
r – [in] : range of elements not initialized
val – [in] : object used for the initialization
- Returns
range initialized
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Compare>
inline bool is_mergeable(range<Iter1, Sent1> const &src1, range<Iter2, Sent2> const &src2, Compare comp)# : indicate if two ranges have a possible merge
- Parameters
src1 – [in] : first range
src2 – [in] : second range
comp – [in] : object for to compare elements
- Throws
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Iter3, typename Sent3, typename Compare>
inline range<Iter3, Sent3> full_merge(range<Iter3, Sent3> const &dest, range<Iter1, Sent1> const &src1, range<Iter2, Sent2> const &src2, Compare comp)# Merge two contiguous ranges src1 and src2 , and put the result in the range dest, returning the range merged.
- Parameters
dest – [in] : range where locate the lements merged. the size of dest must be greater or equal than the sum of the sizes of src1 and src2
src1 – [in] : first range to merge
src2 – [in] : second range to merge
comp – [in] : comparison object
- Returns
range with the elements merged and the size adjusted
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Value, typename Compare>
inline range<Value*> uninit_full_merge(const range<Value*> &dest, range<Iter1, Sent1> const &src1, range<Iter2, Sent2> const &src2, Compare comp)# Merge two contiguous ranges src1 and src2 , and create and move the result in the uninitialized range dest, returning the range merged.
- Parameters
dest – [in] : range where locate the elements merged. the size of dest must be greater or equal than the sum of the sizes of src1 and src2. Initially is uninitialize memory
src1 – [in] : first range to merge
src2 – [in] : second range to merge
comp – [in] : comparison object
- Returns
range with the elements merged and the size adjusted
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Compare>
inline range<Iter2, Sent2> half_merge(range<Iter2, Sent2> const &dest, range<Iter1, Sent1> const &src1, range<Iter2, Sent2> const &src2, Compare comp)# : Merge two buffers. The first buffer is in a separate memory
- Parameters
dest – [in] : range where finish the two buffers merged
src1 – [in] : first range to merge in a separate memory
src2 – [in] : second range to merge, in the final part of the range where deposit the final results
comp – [in] : object for compare two elements of the type pointed by the Iter1 and Iter2
- Returns
: range with the two buffers merged
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Iter3, typename Sent3, typename Compare>
bool in_place_merge_uncontiguous(range<Iter1, Sent1> const &src1, range<Iter2, Sent2> const &src2, range<Iter3, Sent3> &aux, Compare comp)# : merge two non contiguous buffers src1 , src2, using the range aux as auxiliary memory
- Parameters
src1 – [in] : first range to merge
src2 – [in] : second range to merge
aux – [in] : auxiliary range used in the merge
comp – [in] : object for to compare elements
- Throws
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Compare>
inline range<Iter1, Sent1> in_place_merge(range<Iter1, Sent1> const &src1, range<Iter1, Sent1> const &src2, range<Iter2, Sent2> &buf, Compare comp)# : merge two contiguous buffers ( src1, src2) using buf as auxiliary memory
- Parameters
src1 – [in] : first range to merge
src1 – [in] : second range to merge
buf – [in] : auxiliary memory used in the merge
comp – [in] : object for to compare elements
- Throws
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Compare>
inline void merge_flow(range<Iter1, Sent1> rng1, range<Iter2, Sent2> rbuf, range<Iter1, Sent1> rng2, Compare cmp)# : merge two contiguous buffers
- Template Parameters
Iter – : iterator to the elements
compare – : object for to compare two elements pointed by Iter iterators
- Parameters
first – [in] : iterator to the first element
last – [in] : iterator to the element after the last in the range
comp – [in] : object for to compare elements
- Throws
-
template<typename Iter, typename Sent>
-
namespace util
-
namespace parallel