Skip to content

Commit ce5dca4

Browse files
committed
Global macro
1 parent 59f9977 commit ce5dca4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/standard-library/vectorized-stl-algorithms.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ The manually vectorized algorithms use template meta-programming to detect the s
3030

3131
Generally, programs either benefit in performance from this manual vectorization or are unaffected by it. In case of any problem, you can disable manual vectorization by defining the `_USE_STD_VECTOR_ALGORITHMS` macro set to 0. It defaults to 1 on x64 and x86, which means that manually vectorized algorithms are enabled by default.
3232

33+
When overriding `_USE_STD_VECTOR_ALGORITHMS` make sure to set the same value for all linked translation units that use algorithms. Reliable way to achieve that is using project properties rather than defining it in the source.
34+
3335
The following algorithms have manual vectorization controlled via `_USE_STD_VECTOR_ALGORITHMS` macro:
3436
- `contains`
3537
- `contains_subrange`
@@ -87,6 +89,8 @@ There's `_USE_STD_VECTOR_FLOATING_ALGORITHMS` to control the use of these vector
8789

8890
`_USE_STD_VECTOR_FLOATING_ALGORITHMS` defaults to 0 when [`/fp:except`](../build/reference/fp-specify-floating-point-behavior.md#except) option is set. This is to avoid problems with exceptions.
8991

92+
When overriding `_USE_STD_VECTOR_FLOATING_ALGORITHMS` make sure to set the same value for all linked translation units that use algorithms. Reliable way to achieve that is using project properties rather than defining it in the source.
93+
9094
## See also
9195

9296
[Auto-Vectorizer](../parallel/auto-parallelization-and-auto-vectorization.md#auto-vectorizer)

0 commit comments

Comments
 (0)