You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/cmakesettings-reference.md
+3-18Lines changed: 3 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,11 @@ A `configuration` has these properties:
27
27
-`addressSDanitizerEnabled`: if `true` compiles the program with Address Sanitizer (Experimental on Windows). On Linux, compile with -fno-omit-frame-pointer and compiler optimization level -Os or -Oo for best results.
28
28
-`addressSanitizerRuntimeFlags`: runtime flags passed to AddressSanitizer via the ASAN_OPTIONS environment variable. Format: flag1=value:flag2=value2.
29
29
-`buildCommandArgs`: specifies native build switches passed to CMake after --build --. For example, passing -v when using the Ninja generator forces Ninja to output command lines. See [Ninja command line arguments](#ninja) for more information on Ninja commands.
30
-
-`buildRoot`: specifies the directory in which CMake generates build scripts for the chosen generator. Maps to **-DCMAKE_BINARY_DIR** switch and specifies where the CMake cache will be created. If the folder does not exist, it is created. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, and`${env.VARIABLE}`.
30
+
-`buildRoot`: specifies the directory in which CMake generates build scripts for the chosen generator. Maps to **-DCMAKE_BINARY_DIR** switch and specifies where *CMakeCache.txt*will be created. If the folder does not exist, it is created. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
31
31
-`cacheGenerationCommand`: specifies a command line tool and arguments, for example *gencache.bat debug* to generate the cache. The command is run from the shell in the specified environment for the configuration when the user explicity requests regeneration, or a CMakeLists.txt or CMakeSettings.json file is modified.
32
-
-`cacheRoot`: specifies the path to a CMake cache. This directory should contain an existing CMakeCache.txt file.
32
+
-`cacheRoot`: specifies the path to a CMake cache. This directory should contain an existing *CMakeCache.txt* file.
33
33
-`clangTidyChecks`: comma-separated list of warnigns which will be passed to clang-tidy; wildcards are allowed and '-' prefix will remove checks.
34
-
-`cmakeCommandArgs`: specifies additional command-line options passed to CMake when invoked to generate the cache.
34
+
-`cmakeCommandArgs`: specifies additional command-line options passed to CMake when invoked to generate the project files.
35
35
-`cmakeToolchain`: specifies the toolchain file. This is passed to CMake using -DCMAKE_TOOLCHAIN_FILE."
36
36
-`codeAnalysisRuleset`: specifies the ruleset to use when running code analysis. This can be a full path or the file name of a ruleset file installed by Visual Studio.
37
37
-`configurationType`: specifies the build type configuration for the selected generator. May be one of:
@@ -74,22 +74,8 @@ When the active configuration specifies a Visual Studio generator, by default MS
-`configurationType`: specifies the build type configuration for the selected generator. May be one of:
78
-
79
-
- Debug
80
-
- Release
81
-
- MinSizeRel
82
-
- RelWithDebInfo
83
-
84
-
-`buildRoot`: specifies the directory in which CMake generates build scripts for the chosen generator. Maps to **-DCMAKE_BINARY_DIR** switch and specifies where the *CMakeCache.txt* will be created. If the folder does not exist, it is created.Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
85
77
-`installRoot`: specifies the directory in which CMake generates install targets for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
86
-
-`cmakeCommandArgs`: specifies additional command-line options passed to CMake when invoked to generate the project files.
87
-
-`cmakeToolchain`: specifies the toolchain file. This is passed to CMake using -DCMAKE_TOOLCHAIN_FILE."
88
-
-`buildCommandArgs`: specifies native build switches passed to CMake after --build --. For example, passing -v when using the Ninja generator forces Ninja to output command lines. See [Ninja command line arguments](#ninja) for more information on Ninja commands.
89
-
-`ctestCommandArgs`: specifies additional command-line options passed to CTest when running the tests."
90
-
-`codeAnalysisRuleset`: specifies the ruleset to use when running code analysis. This can be a full path or the file name of a ruleset file installed by Visual Studio.
91
78
-`inheritEnvironments`: specifies one or more compiler environments that this configuration depends on. May be any custom environment or one of the predefined environments. For more information, see [Environments](#environments).
92
-
-`installRoot`: specifies the directory in which CMake generates install targets for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
93
79
-`intelliSenseMode`: specifies the mode used for computing intellisense information". May be one of:
94
80
95
81
- windows-msvc-x86
@@ -112,7 +98,6 @@ When the active configuration specifies a Visual Studio generator, by default MS
112
98
- linux-gcc-x64
113
99
- linux-gcc-arm"
114
100
115
-
-`cacheRoot`: specifies the path to a CMake cache. This directory should contain an existing *CMakeCache.txt* file.
116
101
-`name`: names the configuration. See [CMake predefined configuration reference](cmake-predefined-configuration-reference.md) for more information about the pre-defined configurations.
117
102
-`wslPath`: the path to the launcher of an instance of Windows Subsystem for Linux.
Copy file name to clipboardExpand all lines: docs/parallel/concrt/general-best-practices-in-the-concurrency-runtime.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ This document contains the following sections:
28
28
29
29
## <aname="synchronization"></a> Use Cooperative Synchronization Constructs When Possible
30
30
31
-
The Concurrency Runtime provides many concurrency-safe constructs that do not require an external synchronization object. For example, the [concurrency::concurrent_vector](../../parallel/concrt/reference/concurrent-vector-class.md) class provides concurrency-safe append and element access operations. However, for cases where you require exclusive access to a resource, the runtime provides the [concurrency::critical_section](../../parallel/concrt/reference/critical-section-class.md), [concurrency::reader_writer_lock](../../parallel/concrt/reference/reader-writer-lock-class.md), and [concurrency::event](../../parallel/concrt/reference/event-class.md) classes. These types behave cooperatively; therefore, the task scheduler can reallocate processing resources to another context as the first task waits for data. When possible, use these synchronization types instead of other synchronization mechanisms, such as those provided by the Windows API, which do not behave cooperatively. For more information about these synchronization types and a code example, see [Synchronization Data Structures](../../parallel/concrt/synchronization-data-structures.md) and [Comparing Synchronization Data Structures to the Windows API](../../parallel/concrt/comparing-synchronization-data-structures-to-the-windows-api.md).
31
+
The Concurrency Runtime provides many concurrency-safe constructs that do not require an external synchronization object. For example, the [concurrency::concurrent_vector](../../parallel/concrt/reference/concurrent-vector-class.md) class provides concurrency-safe append and element access operations. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order. However, for cases where you require exclusive access to a resource, the runtime provides the [concurrency::critical_section](../../parallel/concrt/reference/critical-section-class.md), [concurrency::reader_writer_lock](../../parallel/concrt/reference/reader-writer-lock-class.md), and [concurrency::event](../../parallel/concrt/reference/event-class.md) classes. These types behave cooperatively; therefore, the task scheduler can reallocate processing resources to another context as the first task waits for data. When possible, use these synchronization types instead of other synchronization mechanisms, such as those provided by the Windows API, which do not behave cooperatively. For more information about these synchronization types and a code example, see [Synchronization Data Structures](../../parallel/concrt/synchronization-data-structures.md) and [Comparing Synchronization Data Structures to the Windows API](../../parallel/concrt/comparing-synchronization-data-structures-to-the-windows-api.md).
The Parallel Patterns Library (PPL) includes several containers and objects that provide thread-safe access to their elements.
10
10
11
-
A *concurrent container* provides concurrency-safe access to the most important operations. The functionality of these containers resembles those that are provided by the C++ Standard Library. For example, the [concurrency::concurrent_vector](../../parallel/concrt/reference/concurrent-vector-class.md) class resembles the [std::vector](../../standard-library/vector-class.md) class, except that the `concurrent_vector` class lets you append elements in parallel. Use concurrent containers when you have parallel code that requires both read and write access to the same container.
11
+
A *concurrent container* provides concurrency-safe access to the most important operations. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order. The functionality of these containers resembles those that are provided by the C++ Standard Library. For example, the [concurrency::concurrent_vector](../../parallel/concrt/reference/concurrent-vector-class.md) class resembles the [std::vector](../../standard-library/vector-class.md) class, except that the `concurrent_vector` class lets you append elements in parallel. Use concurrent containers when you have parallel code that requires both read and write access to the same container.
12
12
13
13
A *concurrent object* is shared concurrently among components. A process that computes the state of a concurrent object in parallel produces the same result as another process that computes the same state serially. The [concurrency::combinable](../../parallel/concrt/reference/combinable-class.md) class is one example of a concurrent object type. The `combinable` class lets you perform computations in parallel, and then combine those computations into a final result. Use concurrent objects when you would otherwise use a synchronization mechanism, for example, a mutex, to synchronize access to a shared variable or resource.
14
14
@@ -56,7 +56,7 @@ Concurrent objects:
56
56
57
57
## <aname="vector"></a> concurrent_vector Class
58
58
59
-
The [concurrency::concurrent_vector](../../parallel/concrt/reference/concurrent-vector-class.md) class is a sequence container class that, just like the [std::vector](../../standard-library/vector-class.md) class, lets you randomly access its elements. The `concurrent_vector` class enables concurrency-safe append and element access operations. Append operations do not invalidate existing pointers or iterators. Iterator access and traversal operations are also concurrency-safe.
59
+
The [concurrency::concurrent_vector](../../parallel/concrt/reference/concurrent-vector-class.md) class is a sequence container class that, just like the [std::vector](../../standard-library/vector-class.md) class, lets you randomly access its elements. The `concurrent_vector` class enables concurrency-safe append and element access operations. Append operations do not invalidate existing pointers or iterators. Iterator access and traversal operations are also concurrency-safe. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order.
60
60
61
61
### <aname="vector-differences"></a> Differences Between concurrent_vector and vector
62
62
@@ -80,7 +80,7 @@ The `concurrent_vector` class closely resembles the `vector` class. The complexi
All methods that append to or increase the size of a `concurrent_vector` object, or access an element in a `concurrent_vector` object, are concurrency-safe. The exception to this rule is the `resize` method.
83
+
All methods that append to or increase the size of a `concurrent_vector` object, or access an element in a `concurrent_vector` object, are concurrency-safe. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order. The exception to this rule is the `resize` method.
84
84
85
85
The following table shows the common `concurrent_vector` methods and operators that are concurrency-safe.
86
86
@@ -106,7 +106,7 @@ When you convert existing code that uses `vector` to use `concurrent_vector`, co
Although the `end` method is concurrency-safe, a concurrent call to the [push_back](reference/concurrent-vector-class.md#push_back) method causes the value that is returned by `end` to change. The number of elements that the iterator traverses is indeterminate. Therefore, this program can produce a different result each time that you run it.
109
+
Although the `end` method is concurrency-safe, a concurrent call to the [push_back](reference/concurrent-vector-class.md#push_back) method causes the value that is returned by `end` to change. The number of elements that the iterator traverses is indeterminate. Therefore, this program can produce a different result each time that you run it. When the element type is non-trivial, it's possible for a race condition to exist between `push_back` and `end` calls. The `end` method may return an element that's allocated, but not fully initialized.
@@ -122,7 +122,7 @@ The data type of the vector elements, `T`, must meet the following requirements.
122
122
123
123
## <aname="queue"></a> concurrent_queue Class
124
124
125
-
The [concurrency::concurrent_queue](../../parallel/concrt/reference/concurrent-queue-class.md) class, just like the [std::queue](../../standard-library/queue-class.md) class, lets you access its front and back elements. The `concurrent_queue` class enables concurrency-safe enqueue and dequeue operations. The `concurrent_queue` class also provides iterator support that is not concurrency-safe.
125
+
The [concurrency::concurrent_queue](../../parallel/concrt/reference/concurrent-queue-class.md) class, just like the [std::queue](../../standard-library/queue-class.md) class, lets you access its front and back elements. The `concurrent_queue` class enables concurrency-safe enqueue and dequeue operations. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order. The `concurrent_queue` class also provides iterator support that is not concurrency-safe.
126
126
127
127
### <aname="queue-differences"></a> Differences Between concurrent_queue and queue
128
128
@@ -140,7 +140,7 @@ The `concurrent_queue` class closely resembles the `queue` class. The following
All methods that enqueue to or dequeue from a `concurrent_queue` object are concurrency-safe.
143
+
All methods that enqueue to or dequeue from a `concurrent_queue` object are concurrency-safe. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order.
144
144
145
145
The following table shows the common `concurrent_queue` methods and operators that are concurrency-safe.
146
146
@@ -198,7 +198,7 @@ To help avoid deadlock, no method of `concurrent_unordered_map` holds a lock whe
The `concurrent_unordered_map` class enables concurrency-safe insert and element-access operations. Insert operations do not invalidate existing pointers or iterators. Iterator access and traversal operations are also concurrency-safe. The following table shows the commonly used `concurrent_unordered_map` methods and operators that are concurrency-safe.
201
+
The `concurrent_unordered_map` class enables concurrency-safe insert and element-access operations. Insert operations do not invalidate existing pointers or iterators. Iterator access and traversal operations are also concurrency-safe. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order. The following table shows the commonly used `concurrent_unordered_map` methods and operators that are concurrency-safe.
The `concurrent_queue` class is a sequence container class that allows first-in, first-out access to its elements. It enables a limited set of concurrency-safe operations, such as `push` and `try_pop`.
10
+
The `concurrent_queue` class is a sequence container class that allows first-in, first-out access to its elements. It enables a limited set of concurrency-safe operations, such as `push` and `try_pop`. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order.
The `concurrent_unordered_map` class is a concurrency-safe container that controls a varying-length sequence of elements of type `std::pair<const K, _Element_type>`. The sequence is represented in a way that enables concurrency-safe append, element access, iterator access, and iterator traversal operations.
10
+
The `concurrent_unordered_map` class is a concurrency-safe container that controls a varying-length sequence of elements of type `std::pair<const K, _Element_type>`. The sequence is represented in a way that enables concurrency-safe append, element access, iterator access, and iterator traversal operations. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order.
The `concurrent_unordered_multimap` class is an concurrency-safe container that controls a varying-length sequence of elements of type `std::pair<const K, _Element_type>`. The sequence is represented in a way that enables concurrency-safe append, element access, iterator access and iterator traversal operations.
10
+
The `concurrent_unordered_multimap` class is an concurrency-safe container that controls a varying-length sequence of elements of type `std::pair<const K, _Element_type>`. The sequence is represented in a way that enables concurrency-safe append, element access, iterator access and iterator traversal operations. Here, concurrency-safe means pointers or iterators are always valid. It's not a guarantee of element initialization, or of a particular traversal order.
0 commit comments