Share via


Concurrency Namespace (C++ AMP)

The Concurrency namespace provides classes and functions that accelerate the execution of C++ code on data parallel hardware. For more information, see C++ AMP Overview

namespace Concurrency;

Members

Namespaces

Name

Description

Concurrency::direct3d Namespace

The direct3d namespace provides functions that support D3D interoperability. It enables seamless use of D3D resources for compute in AMP code and allows you to use resources created in AMP in D3D code, without creating redundant intermediate copies. You can incrementally accelerate the compute intensive sections of your DirectX applications by using C++ AMP and use the D3D API on data produced from AMP computations.

Concurrency::graphics Namespace

The graphics namespace provides types and functions that are designed for graphics programming.

Classes

Name

Description

accelerator Class

Represents an abstraction of a physical DP-optimized compute node.

accelerator_view Class

Represents a virtual device abstraction on a C++ AMP data-parallel accelerator.

array Class

An array is a data aggregate on a accelerator_view in the grid domain. It is a collection of variables, one for each element in a grid domain. Each variable holds a value corresponding to some C++ type.

array_view Class

Represents a view into the data in an array<T,N>.

extent Class (C++ AMP)

Represents a vector of N integer values that specify the bounds of an N-dimensional space that has an origin of 0. The values in the coordinate vector are ordered from most significant to least significant. For example, in Cartesian 3-dimensional space, the extent vector (7,5,3) represents a space in which the z coordinate ranges from 0 to 7, the y coordinate ranges from 0 to 5, and the x coordinate ranges from 0 to 3.

index Class

Defines an N-dimensional index point

invalid_compute_domain Class

The exception that's thrown when the runtime can't start a kernel by using the compute domain specified at the parallel_for_each call site.

out_of_memory Class

The exception that is thrown when a method fails because of a lack of system or device memory.

runtime_exception Class

The base type for exceptions in the C++ Accelerated Massive Parallelism (AMP) library.

tile_barrier Class

The tile_barrier class is a capability class that is only creatable by the system, and passed to a tiled parallel_for_each lambda as part of the tiled_index parameter. It provides a single method, wait(), whose purpose is to synchronize execution of threads running in the thread group (tile).

tiled_index Class

Provides an index into a tiled_grid object. This class has properties to access element relative to the local tile origin and relative to the global origin.

uninitialized_object Class

The exception that is thrown when an uninitialized object is used.

unsupported_feature Class

The exception that is thrown when an unsupported feature is used.

Enumerations

Name

Description

queuing_mode Enumeration

Specifies the queuing modes that are supported on the accelerator.

Functions

Name

Description

all_memory_fence Function

Blocks execution of all threads in a tile until all memory accesses have been completed

atomic_compare_exchange Function

Overloaded. Performs an atomic compare-and-exchange of _Value to the memory location pointed by _Dest Compares _Compare_value with the value of the memory location pointed by _Dest. If they are the same, store _Value to the memory location.

atomic_exchange Function

Overloaded. Sets the value of location pointed by _Dest to _Value as an atomic operation.

atomic_fetch_add Function

Overloaded. Peforms an atomic addition of _Value to the memory location pointed by _Dest.

atomic_fetch_and Function

Overloaded. Peforms an atomic bitwise and operation of _Value to the memory location pointed by _Dest.

atomic_fetch_dec Function

Overloaded. Peforms an atomic decrement to the memory location pointed by _Dest.

atomic_fetch_inc Function

Overloaded. Peforms an atomic increment to the memory location pointed by _Dest.

atomic_fetch_max Function

Overloaded. Atomically compute the maximum of _Value and the value of the memory location pointed by _Dest, and store the maximum value to the memory location.

atomic_fetch_min Function

Overloaded. Atomically compute the minimum of _Value and the value of the memory location pointed by _Dest, and store the minimum value to the memory location.

atomic_fetch_or Function

Overloaded. Peforms an atomic bitwise or operation of _Value to the memory location pointed by _Dest.

atomic_fetch_sub Function

Overloaded. Peforms an atomic subtraction of _Value from the memory location pointed by _Dest.

atomic_fetch_xor Function

Overloaded. Peforms an atomic bitwise xor operation of _Value to the memory location pointed by _Dest.

copy Function

Copies a C++ AMP object. All synchronous data transfer requirements are met. You can't copy data when running code on an accelerator. The general form of this function is copy(src, dest).

copy_async Function

Copies a C++ AMP object and returns future<void> that can be waited on. You can't copy data when running code on an accelerator. The general form of this function is copy(src, dest).

parallel_for_each Function (C++ AMP)

Runs a function across the compute domain.

Constants

Name

Description

HLSL_MAX_NUM_BUFFERS Constant

The maximum number of buffers allowed by DirectX.

MODULENAME_MAX_LENGTH Constant

Stores the maximum length of the module name. This value must be the same on the compiler and runtime.

Requirements

Header: amp.h

See Also

Other Resources

Reference (C++ AMP)