hpx/parallel/util/range.hpp#
Defined in header 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> HPX_CXX_EXPORT range< Iter, Sent > concat (range< Iter, Sent > const &it1, range< Iter, Sent > const &it2)
- template<typename Iter1, typename Sent1, typename Iter2, typename Sent2> HPX_CXX_EXPORT 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> HPX_CXX_EXPORT 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> HPX_CXX_EXPORT void destroy_range (range< Iter, Sent > r)
destroy a range of objects
- Parameters
r – [in] : range to destroy
- template<typename Iter, typename Sent> HPX_CXX_EXPORT 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> HPX_CXX_EXPORT bool is_mergeable (range< Iter1, Sent1 > const &src1, range< Iter2, Sent2 > const &src2, Compare comp)
: indicate if two ranges have a possible merge
Remark
- Parameters
src1 – [in] : first range
src2 – [in] : second range
comp – [in] : object for to compare elements
- Returns
true : they can be merged false : they can’t be merged
- template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Iter3, typename Sent3, typename Compare> HPX_CXX_EXPORT 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 elements 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> HPX_CXX_EXPORT range< Value * > uninit_full_merge (range< Value * > const &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 un-initialize 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> HPX_CXX_EXPORT 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> HPX_CXX_EXPORT 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
Remark
- 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
- Returns
true : not changes done false : changes in the buffers
- template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Compare> HPX_CXX_EXPORT 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
Remark
- Parameters
src1 – [in] : first range to merge
src2 – [in] : second range to merge
buf – [in] : auxiliary memory used in the merge
comp – [in] : object for to compare elements
- Returns
true : not changes done false : changes in the buffers
- template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Compare> HPX_CXX_EXPORT void merge_flow (range< Iter1, Sent1 > rng1, range< Iter2, Sent2 > rbuf, range< Iter1, Sent1 > rng2, Compare cmp)
-
namespace util#
-
namespace parallel#