Skip to content

Commit b595d43

Browse files
committed
1769497, incorporated author feedback.
1 parent eb8ce5f commit b595d43

5 files changed

+8
-8
lines changed

docs/parallel/concrt/how-to-use-a-message-block-filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Because the `transformer` object receives only prime numbers, the `transformer`
3232

3333
The `transformer` object now processes only those values that are prime. In the previous example, `transformer` object processes all messages. Therefore, the previous example must receive the same number of messages that it sends. This example uses the result of the [concurrency::send](reference/concurrency-namespace-functions.md#send) function to determine how many messages to receive from the `transformer` object. The `send` function returns **`true`** when the message buffer accepts the message and **`false`** when the message buffer rejects the message. Therefore, the number of times that the message buffer accepts the message matches the count of prime numbers.
3434

35-
## Example: Complete code sample
35+
## Example: Complete message block filter code sample
3636

3737
The following code shows the complete example. The example calls both the `count_primes` function and the `count_primes_filter` function.
3838

docs/parallel/concrt/how-to-use-exception-handling-to-break-from-a-parallel-loop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The following example creates a `tree` object and searches it for several values
4040

4141
This example uses the [concurrency::parallel_invoke](reference/concurrency-namespace-functions.md#parallel_invoke) algorithm to search for values in parallel. For more information about this algorithm, see [Parallel Algorithms](../../parallel/concrt/parallel-algorithms.md).
4242

43-
## Example: Complete code sample
43+
## Example: Complete exception handling code sample
4444

4545
The following complete example uses exception handling to search for values in a basic tree structure.
4646

docs/parallel/concrt/how-to-use-parallel-containers-to-increase-efficiency.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This topic shows how to use parallel containers to efficiently store and access
1010

1111
The example code computes the set of prime and Carmichael numbers in parallel. Then, for each Carmichael number, the code computes the prime factors of that number.
1212

13-
## Example: is_prime function
13+
## Example: Determine if an input value is a prime number
1414

1515
The following example shows the `is_prime` function, which determines whether an input value is a prime number, and the `is_carmichael` function, which determines whether the input value is a Carmichael number.
1616

@@ -24,23 +24,23 @@ This example uses a [concurrency::concurrent_queue](../../parallel/concrt/refere
2424

2525
[!code-cpp[concrt-carmichael-primes#2](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-containers-to-increase-efficiency_2.cpp)]
2626

27-
## Example: prime_factors_of function
27+
## Example: Find all prime factors of a given value
2828

2929
The following example shows the `prime_factors_of` function, which uses trial division to find all prime factors of the given value.
3030

3131
This function uses the [concurrency::parallel_for_each](reference/concurrency-namespace-functions.md#parallel_for_each) algorithm to iterate through the collection of prime numbers. The `concurrent_vector` object enables the parallel loop to concurrently add prime factors to the result.
3232

3333
[!code-cpp[concrt-carmichael-primes#3](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-containers-to-increase-efficiency_3.cpp)]
3434

35-
## Example: Call the prime_factors_of function
35+
## Example: Processes each element in the queue of Carmichael numbers
3636

3737
This example processes each element in the queue of Carmichael numbers by calling the `prime_factors_of` function to compute its prime factors. It uses a task group to perform this work in parallel. For more information about task groups, see [Task Parallelism](../../parallel/concrt/task-parallelism-concurrency-runtime.md).
3838

3939
This example prints the prime factors for each Carmichael number if that number has more than four prime factors.
4040

4141
[!code-cpp[concrt-carmichael-primes#4](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-containers-to-increase-efficiency_4.cpp)]
4242

43-
## Example: Complete code sample
43+
## Example: Complete parallel container code sample
4444

4545
The following code shows the complete example, which uses parallel containers to compute the prime factors of the Carmichael numbers.
4646

docs/parallel/concrt/how-to-use-parallel-invoke-to-execute-parallel-operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.assetid: a6aea69b-d647-4b7e-bf3b-e6a6a9880072
88

99
This example shows how to use the [concurrency::parallel_invoke](reference/concurrency-namespace-functions.md#parallel_invoke) algorithm to improve the performance of a program that performs multiple operations on a shared data source. Because no operations modify the source, they can be executed in parallel in a straightforward manner.
1010

11-
## Example: Create MyDataType variable
11+
## Example: Create, initialize, and perform operations on a variable
1212

1313
Consider the following code example that creates a variable of type `MyDataType`, calls a function to initialize that variable, and then performs multiple lengthy operations on that data.
1414

docs/parallel/concrt/how-to-write-a-parallel-for-loop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The following example shows the `parallel_matrix_multiply` function, which uses
2222

2323
This example parallelizes the outer loop only because it performs enough work to benefit from the overhead for parallel processing. If you parallelize the inner loop, you will not receive a gain in performance because the small amount of work that the inner loop performs does not overcome the overhead for parallel processing. Therefore, parallelizing the outer loop only is the best way to maximize the benefits of concurrency on most systems.
2424

25-
## Example: Complete code sample
25+
## Example: Complete parallel_for loop code sample
2626

2727
The following more complete example compares the performance of the `matrix_multiply` function versus the `parallel_matrix_multiply` function.
2828

0 commit comments

Comments
 (0)