hpx/parallel/util/low_level.hpp
hpx/parallel/util/low_level.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#
Functions
-
template<typename Value, typename ...Args>
inline void construct_object(Value *ptr, Args&&... args)# create an object in the memory specified by ptr
- Template Parameters
Value – : typename of the object to create
Args – : parameters for the constructor
- Parameters
ptr – [in] : pointer to the memory where to create the object
args – [in] : arguments to the constructor
-
template<typename Value>
inline void destroy_object(Value *ptr)# destroy an object in the memory specified by ptr
- Template Parameters
Value – : typename of the object to create
- Parameters
ptr – [in] : pointer to the object to destroy
-
template<typename Iter, typename Sent>
inline void init(Iter first, Sent last, 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 Value, typename ...Args>
inline void construct(Value *ptr, Args&&... args)# create an object in the memory specified by ptr
- Template Parameters
Value – : typename of the object to create
Args – : parameters for the constructor
- Parameters
ptr – [in] : pointer to the memory where to create the object
args – [in] : arguments to the constructor
-
template<typename Iter1, typename Sent1, typename Iter2>
inline Iter2 init_move(Iter2 it_dest, Iter1 first, Sent1 last)# Move objects.
- Template Parameters
Iter – : iterator to the elements
Value – : typename of the object to create
- Parameters
itdest – [in] : iterator to the final place of the objects
R – [in] : range to move
-
template<typename Iter, typename Sent, typename Value = typename std::iterator_traits<Iter>::value_type>
inline Value *uninit_move(Value *ptr, Iter first, Sent last)# Move objects to uninitialized memory.
- Template Parameters
Iter – : iterator to the elements
Value – : typename of the object to construct
- Parameters
ptr – [in] : pointer to the memory where to create the object
R – [in] : range to move
-
template<typename Iter, typename Sent>
inline void destroy(Iter first, Sent last)# Move objects to uninitialized memory.
- Template Parameters
Iter – : iterator to the elements
Value – : typename of the object to construct
- Parameters
ptr – [in] : pointer to the memory where to construct the object
R – [in] : range to move
-
template<typename Iter1, typename Sent1, typename Iter2, typename Compare>
inline Iter2 full_merge(Iter1 buf1, Sent1 end_buf1, Iter1 buf2, Sent1 end_buf2, Iter2 buf_out, Compare comp)# Merge two contiguous buffers pointed by buf1 and buf2 , and put in the buffer pointed by buf_out.
- Parameters
buf1 – [in] : iterator to the first element in the first buffer
end_buf1 – [in] : final iterator of first buffer
buf2 – [in] : iterator to the first iterator to the second buffer
end_buf2 – [in] : final iterator of the second buffer
buf_out – [in] : buffer where move the elements merged
comp – [in] : comparison object
-
template<typename Iter, typename Sent, typename Value, typename Compare>
inline Value *uninit_full_merge(Iter first1, Sent last1, Iter first2, Sent last2, Value *it_out, Compare comp)# Merge two contiguous buffers pointed by first1 and first2 , and put in the uninitialized buffer pointed by it_out.
- Parameters
first1 – [in] : iterator to the first element in the first buffer
last – [in] : last iterator of the first buffer
first2 – [in] : iterator to the first element to the second buffer
last22 – [in] : final iterator of the second buffer
it_out – [in] : uninitialized buffer where move the elements merged
comp – [in] : comparison object
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Compare>
inline Iter2 half_merge(Iter1 buf1, Sent1 end_buf1, Iter2 buf2, Sent2 end_buf2, Iter2 buf_out, Compare comp)# : Merge two buffers. The first buffer is in a separate memory. The second buffer have a empty space before buf2 of the same size than the (end_buf1 - buf1)
Remark
The elements pointed by Iter1 and Iter2 must be the same
- Parameters
buf1 – [in] : iterator to the first element of the first buffer
end_buf1 – [in] : iterator to the last element of the first buffer
buf2 – [in] : iterator to the first element of the second buffer
end_buf2 – [in] : iterator to the last element of the second buffer
buf_out – [in] : iterator to the first element to the buffer where put the result
comp – [in] : object for Compare two elements of the type pointed by the Iter1 and Iter2
-
template<typename Iter1, typename Sent1, typename Iter2, typename Sent2, typename Iter3, typename Compare>
bool in_place_merge_uncontiguous(Iter1 src1, Sent1 end_src1, Iter2 src2, Sent2 end_src2, Iter3 aux, Compare comp)# Merge two non contiguous buffers, placing the results in the buffers for to do this use an auxiliary buffer pointed by aux
- Parameters
src1 – [in] : iterator to the first element of the first buffer
end_src1 – [in] : last iterator of the first buffer
src2 – [in] : iterator to the first element of the second buffer
end_src2 – [in] : last iterator of the second buffer
aux – [in] : iterator to the first element of the auxiliary buffer
comp – [in] : object for to Compare elements
- Throws
-
template<typename Iter1, typename Sent1, typename Iter2, typename Compare>
inline bool in_place_merge(Iter1 src1, Iter1 src2, Sent1 end_src2, Iter2 buf, Compare comp)# : merge two contiguous buffers,using an auxiliary buffer pointed by buf
- Parameters
src1 – [in] iterator to the first position of the first buffer
src2 – [in] final iterator of the first buffer and first iterator of the second buffer
end_src2 – [in] : final iterator of the second buffer
buf – [in] : iterator to buffer used as auxiliary memory
comp – [in] : object for to Compare elements
- Throws
-
template<typename Value, typename ...Args>
-
namespace util#
-
namespace parallel