-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParallelAlgos.cpp
41 lines (29 loc) · 1.02 KB
/
ParallelAlgos.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* \file main.cpp
* \brief Parallel algorithms
*
* \todo
*
* Many of the STL algorithms, such as the copy, find and sort methods, started to support the
* parallel execution policies: seq, par and par_unseq which translate to "sequentially",
* "parallel" and "parallel unsequenced".
*/
#include <StdStream/StdStream.h>
#include <StdTest/StdTest.h>
#include <Stl.h>
//-------------------------------------------------------------------------------------------------
int main(int, char **)
{
#if 0
std::vector<int> longVector;
// Find element using parallel execution policy
auto result1 = std::find(std::execution::par, std::begin(longVector), std::end(longVector), 2);
// Sort elements using sequential execution policy
auto result2 = std::sort(std::execution::seq, std::begin(longVector), std::end(longVector));
// std::cout << STD_TRACE_VAR("") << std::endl;
#endif
return EXIT_SUCCESS;
}
//-------------------------------------------------------------------------------------------------
#if OUTPUT
#endif