The Algorithm class.
More...
#include <Algorithm.h>
|
| template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type> |
| static InputIt | parallelFind (InputIt start, InputIt end, const T &val) |
| template<class InputIt, class UnaryPred> |
| static InputIt | parallelFindIf (InputIt start, InputIt end, UnaryPred predicate) |
| template<class InputIt, class UnaryPred> |
| static void | parallelSort (InputIt start, InputIt end, UnaryPred predicate) |
| template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type> |
| static InputIt | parallelRemove (InputIt start, InputIt end, const T &val) |
| template<class InputIt, class UnaryPred, class T = typename std::iterator_traits<InputIt>::value_type> |
| static InputIt | parallelRemoveIf (InputIt start, InputIt end, UnaryPred predicate) |
The Algorithm class.
This class contains some parallelized algorithms for standard containers.
◆ parallelFind()
template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type>
| InputIt Algorithm::parallelFind |
( |
InputIt | start, |
|
|
InputIt | end, |
|
|
const T & | val ) |
|
inlinestatic |
Acts like std::find.
- Note
- OMP_CANCELLATION system variable should be set to true before program start to achieve maximum effectiveness.
- Parameters
-
| start | Begin iterator. |
| end | End iterator. |
| val | Value to be found. |
- Returns
- Iterarator pointing to found object or end iterator.
◆ parallelFindIf()
template<class InputIt, class UnaryPred>
| InputIt Algorithm::parallelFindIf |
( |
InputIt | start, |
|
|
InputIt | end, |
|
|
UnaryPred | predicate ) |
|
inlinestatic |
Acts like std::find_if.
- Note
- OMP_CANCELLATION system variable should be set to true before program start to achieve maximum effectiveness.
- Parameters
-
| start | Begin iterator. |
| end | End iterator. |
| predicate | Method used to check conditions. |
- Returns
- Iterator pointing to found element or end iterator.
◆ parallelRemove()
template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type>
| InputIt Algorithm::parallelRemove |
( |
InputIt | start, |
|
|
InputIt | end, |
|
|
const T & | val ) |
|
inlinestatic |
Acts like std::remove.
- Parameters
-
| start | Begin iterator. |
| end | End iterator. |
| val | Value of element to be removed. |
- Returns
- Past-the-end iterator for the new range of values (if this is not end, then it points to an unspecified value, and so do iterators to any values between this iterator and end).
◆ parallelRemoveIf()
template<class InputIt, class UnaryPred, class T = typename std::iterator_traits<InputIt>::value_type>
| InputIt Algorithm::parallelRemoveIf |
( |
InputIt | start, |
|
|
InputIt | end, |
|
|
UnaryPred | predicate ) |
|
inlinestatic |
Acts like std::remove_if.
- Parameters
-
| start | Begin iterator. |
| end | End iterator. |
| predicate | Method to check conditions. |
- Returns
- Past-the-end iterator for the new range of values (if this is not end, then it points to an unspecified value, and so do iterators to any values between this iterator and end).
◆ parallelSort()
template<class InputIt, class UnaryPred>
| void Algorithm::parallelSort |
( |
InputIt | start, |
|
|
InputIt | end, |
|
|
UnaryPred | predicate ) |
|
inlinestatic |
Acts like std::sort. Uses quicksort algorithm.
- Parameters
-
| start | Begin iterator. |
| end | End iterator. |
| predicate | Method used to compare elements. |