Skip to content

Include namespace prefix in links #5508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/parallel/amp/reference/array-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The rank of the array.

|Name|Description|
|----------|-----------------|
|[`operator std::vector<value_type>`](#operator_vec)|Uses `copy(*this, vector)` to implicitly convert the array to a std::[vector](../../../standard-library/vector-class.md) object.|
|[`operator std::vector<value_type>`](#operator_vec)|Uses `copy(*this, vector)` to implicitly convert the array to a [std::vector](../../../standard-library/vector-class.md) object.|
|[operator()](#operator_call)|Returns the element value that is specified by the parameters.|
|[operator\[\]](#operator_at)|Returns the element that is at the specified index.|
|[operator=](#operator_eq)|Copies the contents of the specified `array` object into this one.|
Expand Down
9 changes: 4 additions & 5 deletions docs/parallel/concrt/asynchronous-message-blocks.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
description: "Learn more about: Asynchronous Message Blocks"
title: "Asynchronous Message Blocks"
ms.date: "11/04/2016"
description: "Learn more about: Asynchronous Message Blocks"
ms.date: 11/04/2016
helpviewer_keywords: ["non-greedy join [Concurrency Runtime]", "asynchronous message blocks", "greedy join [Concurrency Runtime]"]
ms.assetid: 79c456c0-1692-480c-bb67-98f2434c1252
---
# Asynchronous Message Blocks

Expand Down Expand Up @@ -257,7 +256,7 @@ The [concurrency::join](../../parallel/concrt/reference/join-class.md) and [conc

Reading from a `join` or `multitype_join` object resembles calling the Windows API function `WaitForMultipleObjects` when it has the `bWaitAll` parameter set to `TRUE`. However, just like a `choice` object, `join` and `multitype_join` objects use an event mechanism that binds data to the event itself instead of to an external synchronization object.

Reading from a `join` object produces a std::[vector](../../standard-library/vector-class.md) object. Reading from a `multitype_join` object produces a std::[tuple](../../standard-library/tuple-class.md) object. Elements appear in these objects in the same order as their corresponding source buffers are linked to the `join` or `multitype_join` object. Because the order in which you link source buffers to a `join` or `multitype_join` object is associated with the order of elements in the resulting `vector` or `tuple` object, we recommend that you do not unlink an existing source buffer from a join. Doing so can result in unspecified behavior.
Reading from a `join` object produces a [std::vector](../../standard-library/vector-class.md) object. Reading from a `multitype_join` object produces a [std::tuple](../../standard-library/tuple-class.md) object. Elements appear in these objects in the same order as their corresponding source buffers are linked to the `join` or `multitype_join` object. Because the order in which you link source buffers to a `join` or `multitype_join` object is associated with the order of elements in the resulting `vector` or `tuple` object, we recommend that you do not unlink an existing source buffer from a join. Doing so can result in unspecified behavior.

### Greedy Versus Non-Greedy Joins

Expand Down Expand Up @@ -285,7 +284,7 @@ For complete examples that show how to use the `join` class, see [How to: Select

## <a name="timer"></a> timer Class

The concurrency::[timer class](../../parallel/concrt/reference/timer-class.md) acts as a message source. A `timer` object sends a message to a target after a specified period of time has elapsed. The `timer` class is useful when you must delay sending a message or you want to send a message at a regular interval.
The [concurrency::timer class](../../parallel/concrt/reference/timer-class.md) acts as a message source. A `timer` object sends a message to a target after a specified period of time has elapsed. The `timer` class is useful when you must delay sending a message or you want to send a message at a regular interval.

The `timer` class sends its message to just one target. If you set the `_PTarget` parameter in the constructor to `NULL`, you can later specify the target by calling the [concurrency::ISource::link_target](reference/source-block-class.md#link_target) method.

Expand Down
9 changes: 4 additions & 5 deletions docs/parallel/concrt/contexts.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
description: "Learn more about: Contexts"
title: "Contexts"
ms.date: "11/04/2016"
description: "Learn more about: Contexts"
ms.date: 11/04/2016
helpviewer_keywords: ["contexts [Concurrency Runtime]"]
ms.assetid: 10c1d861-8fbb-4ba0-b2ec-61876b11176e
---
# Contexts

This document describes the role of contexts in the Concurrency Runtime. A thread that is attached to a scheduler is known as an *execution context*, or just *context*. The [concurrency::wait](reference/concurrency-namespace-functions.md#wait) function and the concurrency::[Context class](../../parallel/concrt/reference/context-class.md) enable you to control the behavior of contexts. Use the `wait` function to suspend the current context for a specified time. Use the `Context` class when you need more control over when contexts block, unblock, and yield, or when you want to oversubscribe the current context.
This document describes the role of contexts in the Concurrency Runtime. A thread that is attached to a scheduler is known as an *execution context*, or just *context*. The [concurrency::wait](reference/concurrency-namespace-functions.md#wait) function and the [concurrency::Context class](../../parallel/concrt/reference/context-class.md) enable you to control the behavior of contexts. Use the `wait` function to suspend the current context for a specified time. Use the `Context` class when you need more control over when contexts block, unblock, and yield, or when you want to oversubscribe the current context.

> [!TIP]
> The Concurrency Runtime provides a default scheduler, and therefore you are not required to create one in your application. Because the Task Scheduler helps you fine-tune the performance of your applications, we recommend that you start with the [Parallel Patterns Library (PPL)](../../parallel/concrt/parallel-patterns-library-ppl.md) or the [Asynchronous Agents Library](../../parallel/concrt/asynchronous-agents-library.md) if you are new to the Concurrency Runtime.
Expand All @@ -24,7 +23,7 @@ For an example that uses the `wait` function to yield the current context, and t

## The Context Class

The concurrency::[Context class](../../parallel/concrt/reference/context-class.md) provides a programming abstraction for an execution context and offers two important features: the ability to cooperatively block, unblock, and yield the current context, and the ability to oversubscribe the current context.
The [concurrency::Context class](../../parallel/concrt/reference/context-class.md) provides a programming abstraction for an execution context and offers two important features: the ability to cooperatively block, unblock, and yield the current context, and the ability to oversubscribe the current context.

### Cooperative Blocking

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
description: "Learn more about: How to: Send a Message at a Regular Interval"
title: "How to: Send a Message at a Regular Interval"
ms.date: "11/04/2016"
description: "Learn more about: How to: Send a Message at a Regular Interval"
ms.date: 11/04/2016
helpviewer_keywords: ["timer class, example", "sending messages at regular intervals [Concurrency Runtime]"]
ms.assetid: 4b60ea6c-97c8-4d69-9f7b-ad79f3548026
---
# How to: Send a Message at a Regular Interval

This example shows how to use the concurrency::[timer class](../../parallel/concrt/reference/timer-class.md) to send a message at a regular interval.
This example shows how to use the [concurrency::timer class](../../parallel/concrt/reference/timer-class.md) to send a message at a regular interval.

## Example

Expand Down
11 changes: 5 additions & 6 deletions docs/parallel/concrt/parallel-algorithms.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
description: "Learn more about: Parallel Algorithms"
title: "Parallel Algorithms"
ms.date: "11/19/2018"
description: "Learn more about: Parallel Algorithms"
ms.date: 11/19/2018
helpviewer_keywords: ["parallel algorithms [Concurrency Runtime]"]
ms.assetid: 045dca7b-4d73-4558-a44c-383b88a28473
ms.topic: how-to
---
# Parallel Algorithms
Expand Down Expand Up @@ -144,7 +143,7 @@ You can use the `parallel transform` algorithm to perform many data parallelizat

- Perform 3-D ray tracing, where each iteration refers to one pixel that must be rendered.

The following example shows the basic structure that is used to call the `parallel_transform` algorithm. This example negates each element of a std::[vector](../../standard-library/vector-class.md) object in two ways. The first way uses a lambda expression. The second way uses [std::negate](../../standard-library/negate-struct.md), which derives from [std::unary_function](../../standard-library/unary-function-struct.md).
The following example shows the basic structure that is used to call the `parallel_transform` algorithm. This example negates each element of a [std::vector](../../standard-library/vector-class.md) object in two ways. The first way uses a lambda expression. The second way uses [std::negate](../../standard-library/negate-struct.md), which derives from [std::unary_function](../../standard-library/unary-function-struct.md).

[!code-cpp[concrt-basic-parallel-transform#1](../../parallel/concrt/codesnippet/cpp/parallel-algorithms_4.cpp)]

Expand Down Expand Up @@ -207,7 +206,7 @@ Divides work into ranges such that each range has at least the number of iterati
Divides work into a fixed number of ranges (typically the number of worker threads that are available to work on the loop). This partitioner type can improve performance because it does not use work-stealing and therefore has less overhead. Use this partitioner type when each iteration of a parallel loop performs a fixed and uniform amount of work and you do not require support for cancellation or forward cooperative blocking.

> [!WARNING]
> The `parallel_for_each` and `parallel_transform` algorithms support only containers that use random access iterators (such as std::[vector](../../standard-library/vector-class.md)) for the static, simple, and affinity partitioners. The use of containers that use bidirectional and forward iterators produces a compile-time error. The default partitioner, `auto_partitioner`, supports all three of these iterator types.
> The `parallel_for_each` and `parallel_transform` algorithms support only containers that use random access iterators (such as [std::vector](../../standard-library/vector-class.md)) for the static, simple, and affinity partitioners. The use of containers that use bidirectional and forward iterators produces a compile-time error. The default partitioner, `auto_partitioner`, supports all three of these iterator types.

Typically, these partitioners are used in the same way, except for `affinity_partitioner`. Most partitioner types do not maintain state and are not modified by the runtime. Therefore you can create these partitioner objects at the call site, as shown in the following example.

Expand Down Expand Up @@ -263,7 +262,7 @@ This example shows how to provide a hash function to the `parallel_radixsort` al

For illustration, this example uses a relatively small data set. You can increase the initial size of the vector to experiment with performance improvements over larger sets of data.

This example uses a lambda expression as the hash function. You can also use one of the built-in implementations of the std::[hash class](../../standard-library/hash-class.md) or define your own specialization. You can also use a custom hash function object, as shown in this example:
This example uses a lambda expression as the hash function. You can also use one of the built-in implementations of the [std::hash class](../../standard-library/hash-class.md) or define your own specialization. You can also use a custom hash function object, as shown in this example:

[!code-cpp[concrt-parallel-sort-points#2](../../parallel/concrt/codesnippet/cpp/parallel-algorithms_13.cpp)]
&nbsp;
Expand Down
7 changes: 3 additions & 4 deletions docs/parallel/concrt/schedule-groups.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
description: "Learn more about: Schedule Groups"
title: "Schedule Groups"
ms.date: "11/04/2016"
description: "Learn more about: Schedule Groups"
ms.date: 11/04/2016
helpviewer_keywords: ["schedule groups"]
ms.assetid: 03523572-5891-4d17-89ce-fa795605f28b
---
# Schedule Groups

Expand All @@ -18,7 +17,7 @@ The `SchedulingProtocol` scheduler policy influences the order in which the sche

The runtime uses the [concurrency::ScheduleGroup](../../parallel/concrt/reference/schedulegroup-class.md) class to represent schedule groups. To create a `ScheduleGroup` object, call the [concurrency::CurrentScheduler::CreateScheduleGroup](reference/currentscheduler-class.md#createschedulegroup) or [concurrency::Scheduler::CreateScheduleGroup](reference/scheduler-class.md#createschedulegroup) method. The runtime uses a reference-counting mechanism to control the lifetime of `ScheduleGroup` objects, just as it does with `Scheduler` objects. When you create a `ScheduleGroup` object, the runtime sets the reference counter to one. The [concurrency::ScheduleGroup::Reference](reference/schedulegroup-class.md#reference) method increments the reference counter by one. The [concurrency::ScheduleGroup::Release](reference/schedulegroup-class.md#release) method decrements the reference counter by one.

Many types in the Concurrency Runtime let you associate an object together with a schedule group. For example, the [concurrency::agent](../../parallel/concrt/reference/agent-class.md) class and message block classes such as [concurrency::unbounded_buffer](reference/unbounded-buffer-class.md), [concurrency::join](../../parallel/concrt/reference/join-class.md), and concurrency::[timer](reference/timer-class.md), provide overloaded versions of the constructor that take a `ScheduleGroup` object. The runtime uses the `Scheduler` object that is associated with this `ScheduleGroup` object to schedule the task.
Many types in the Concurrency Runtime let you associate an object together with a schedule group. For example, the [concurrency::agent](../../parallel/concrt/reference/agent-class.md) class and message block classes such as [concurrency::unbounded_buffer](reference/unbounded-buffer-class.md), [concurrency::join](../../parallel/concrt/reference/join-class.md), and [concurrency::timer](reference/timer-class.md), provide overloaded versions of the constructor that take a `ScheduleGroup` object. The runtime uses the `Scheduler` object that is associated with this `ScheduleGroup` object to schedule the task.

You can also use the [concurrency::ScheduleGroup::ScheduleTask](reference/schedulegroup-class.md#scheduletask) method to schedule a lightweight task. For more information about lightweight tasks, see [Lightweight Tasks](../../parallel/concrt/lightweight-tasks.md).

Expand Down
9 changes: 4 additions & 5 deletions docs/parallel/concrt/task-parallelism-concurrency-runtime.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
description: "Learn more about: Task Parallelism (Concurrency Runtime)"
title: "Task Parallelism (Concurrency Runtime)"
ms.date: "11/04/2016"
description: "Learn more about: Task Parallelism (Concurrency Runtime)"
ms.date: 11/04/2016
helpviewer_keywords: ["structured task groups [Concurrency Runtime]", "structured tasks [Concurrency Runtime]", "task groups [Concurrency Runtime]", "task parallelism", "tasks [Concurrency Runtime]"]
ms.assetid: 42f05ac3-2098-494a-ba84-737fcdcad077
ms.topic: how-to
---
# Task Parallelism (Concurrency Runtime)
Expand Down Expand Up @@ -151,7 +150,7 @@ This section describes the [concurrency::when_all](reference/concurrency-namespa

### <a name="when-all"></a> The when_all Function

The `when_all` function produces a task that completes after a set of tasks complete. This function returns a std::[vector](../../standard-library/vector-class.md) object that contains the result of each task in the set. The following basic example uses `when_all` to create a task that represents the completion of three other tasks.
The `when_all` function produces a task that completes after a set of tasks complete. This function returns a [std::vector](../../standard-library/vector-class.md) object that contains the result of each task in the set. The following basic example uses `when_all` to create a task that represents the completion of three other tasks.

[!code-cpp[concrt-join-tasks#1](../../parallel/concrt/codesnippet/cpp/task-parallelism-concurrency-runtime_8.cpp)]

Expand Down Expand Up @@ -270,7 +269,7 @@ Unstructured task groups and structured task groups work with task handles in di

[!code-cpp[concrt-make-task-structure#1](../../parallel/concrt/codesnippet/cpp/task-parallelism-concurrency-runtime_16.cpp)]

To manage task handles for cases where you have a variable number of tasks, use a stack-allocation routine such as [_malloca](../../c-runtime-library/reference/malloca.md) or a container class, such as std::[vector](../../standard-library/vector-class.md).
To manage task handles for cases where you have a variable number of tasks, use a stack-allocation routine such as [_malloca](../../c-runtime-library/reference/malloca.md) or a container class, such as [std::vector](../../standard-library/vector-class.md).

Both `task_group` and `structured_task_group` support cancellation. For more information about cancellation, see [Cancellation in the PPL](cancellation-in-the-ppl.md).

Expand Down
Loading