annotate pstl/README.md @ 256:7d9b19ec7a62

cbclang output is still wrong
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 18 Aug 2023 18:48:47 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # Parallel STL
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies,
anatofuz
parents:
diff changeset
4 as specified in ISO/IEC 14882:2017 standard, commonly called C++17. The implementation also supports the unsequenced
anatofuz
parents:
diff changeset
5 execution policy specified in Parallelism TS version 2 and proposed for the next version of the C++ standard in the
anatofuz
parents:
diff changeset
6 C++ working group paper [P1001](https://wg21.link/p1001).
anatofuz
parents:
diff changeset
7 Parallel STL offers efficient support for both parallel and vectorized execution of algorithms. For sequential
anatofuz
parents:
diff changeset
8 execution, it relies on an available implementation of the C++ standard library.
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 ## Prerequisites
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 To use Parallel STL, you must have the following software installed:
anatofuz
parents:
diff changeset
13 * C++ compiler with:
anatofuz
parents:
diff changeset
14 * Support for C++11
anatofuz
parents:
diff changeset
15 * Support for OpenMP* 4.0 SIMD constructs
anatofuz
parents:
diff changeset
16 * Threading Building Blocks (TBB) which is available for download at https://github.com/01org/tbb/
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 ## Known issues and limitations
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 * `unseq` and `par_unseq` policies only have effect with compilers that support `#pragma omp simd` or `#pragma simd`.
anatofuz
parents:
diff changeset
21 * Parallel and vector execution is only supported for the algorithms if random access iterators are provided,
anatofuz
parents:
diff changeset
22 while for other iterator types the execution will remain serial.
anatofuz
parents:
diff changeset
23 * The following algorithms do not allow efficient SIMD execution: `includes`, `inplace_merge`, `merge`, `nth_element`,
anatofuz
parents:
diff changeset
24 `partial_sort`, `partial_sort_copy`, `set_difference`, `set_intersection`, `set_symmetric_difference`, `set_union`,
anatofuz
parents:
diff changeset
25 `sort`, `stable_partition`, `stable_sort`, `unique`.
anatofuz
parents:
diff changeset
26 * The initial value type for `exclusive_scan`, `inclusive_scan`, `transform_exclusive_scan`, `transform_inclusive_scan`
anatofuz
parents:
diff changeset
27 shall be DefaultConstructible. A default constructed-instance of the initial value type shall be the identity element
anatofuz
parents:
diff changeset
28 for the specified binary operation.
anatofuz
parents:
diff changeset
29 * For `max_element`, `min_element`, `minmax_element`, `partial_sort`, `partial_sort_copy`, `sort`, `stable_sort`
anatofuz
parents:
diff changeset
30 the dereferenced value type of the provided iterators shall be DefaultConstructible.
anatofuz
parents:
diff changeset
31 * For `remove`, `remove_if`, `unique` the dereferenced value type of the provided iterators shall be MoveConstructible.
anatofuz
parents:
diff changeset
32 * The following algorithms require additional O(n) memory space for parallel execution: `copy_if`, `inplace_merge`,
anatofuz
parents:
diff changeset
33 `partial_sort`, `partial_sort_copy`, `partition_copy`, `remove`, `remove_if`, `rotate`, `sort`, `stable_sort`,
anatofuz
parents:
diff changeset
34 `unique`, `unique_copy`.
anatofuz
parents:
diff changeset
35