Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[oneTBB] Pass range to the parallel_sort algorithm by forwarding reference #380

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Function template that sorts a sequence.
void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp );

template<typename Container>
void parallel_sort( Container& c );
void parallel_sort( Container&& c );
template<typename Container>
void parallel_sort( Container& c, const Compare& comp );
void parallel_sort( Container&& c, const Compare& comp );

} // namespace tbb
} // namespace oneapi
Expand All @@ -49,9 +49,9 @@ A call ``parallel_sort( begin, end, comp )`` sorts the sequence *[begin, end)* u
A call ``parallel_sort( begin, end )`` is equivalent to ``parallel_sort( begin, end, comp )``, where `comp`
uses `operator<` to determine relative orderings.

A call ``parallel_sort( c, comp )`` is equivalent to ``parallel_sort( std::begin(c), std::end(c), comp )``.
A call ``parallel_sort( c, comp )`` is equivalent to ``parallel_sort(std::begin(std::forward<C>(c)), std::end(std::forward<C>(c)), comp )``.
ivankochin marked this conversation as resolved.
Show resolved Hide resolved

A call ``parallel_sort( c )`` is equivalent to ``parallel_sort( c, comp )``, where `comp` uses `operator<`
A call ``parallel_sort( c )`` is equivalent to ``parallel_sort( std::forward<C>(c), comp )``, where `comp` uses `operator<`
ivankochin marked this conversation as resolved.
Show resolved Hide resolved
to determine relative orderings.

**Complexity**
Expand Down