Szerkesztés

Megosztás a következőn keresztül:


C++ AMP (C++ Accelerated Massive Parallelism)

C++ AMP (C++ Accelerated Massive Parallelism) accelerates the execution of your C++ code by taking advantage of the data-parallel hardware that's commonly present as a graphics processing unit (GPU) on a discrete graphics card. The C++ AMP programming model includes support for multidimensional arrays, indexing, memory transfer, and tiling. It also includes a mathematical function library. You can use C++ AMP language extensions to control how data is moved from the CPU to the GPU and back.

Note

C++ AMP headers are deprecated starting with Visual Studio 2022 version 17.0. Including any AMP headers will generate build errors. Define _SILENCE_AMP_DEPRECATION_WARNINGS before including any AMP headers to silence the warnings.

Title Description
C++ AMP Overview Describes the key features of C++ AMP and the mathematical library.
Using Lambdas, Function Objects, and Restricted Functions Describes how to use lambda expressions, function objects, and restricted functions in calls to the parallel_for_each method.
Using Tiles Describes how to use tiles to accelerate your C++ AMP code.
Using accelerator and accelerator_view Objects Describes how to use accelerators to customize execution of your code on the GPU.
Using C++ AMP in UWP Apps Describes how to use C++ AMP in Universal Windows Platform (UWP) apps that use Windows Runtime types.
Graphics (C++ AMP) Describes how to use the C++ AMP graphics library.
Walkthrough: Matrix Multiplication Demonstrates matrix multiplication using C++ AMP code and tiling.
Walkthrough: Debugging a C++ AMP Application Explains how to create and debug an application that uses parallel reduction to sum up a large array of integers.

Reference

Reference (C++ AMP)
tile_static Keyword
restrict (C++ AMP)

Other Resources

Parallel Programming in Native Code Blog
C++ AMP sample projects for download
Analyzing C++ AMP Code with the Concurrency Visualizer