Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Features  





2 See also  





3 References  





4 Further reading  





5 External links  














C++ AMP







Română
Русский
Suomi
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Original author(s)Microsoft
TypeLibrary
LicenseInconclusive
Websitedocs.microsoft.com/en-us/cpp/parallel/amp/cpp-amp-cpp-accelerated-massive-parallelism Edit this on Wikidata

C++ Accelerated Massive Parallelism (C++ AMP) is a native programming model that contains elements that span the C++ programming language and its runtime library. It provides an easy way to write programs that compile and execute on data-parallel hardware, such as graphics cards (GPUs).

Beginning with Visual Studio 2022 (version 17.0), C++ AMP is declared as deprecated, indicating its end of support beyond Visual Studio 2022.

C++ AMP is a library implemented on DirectX 11 and an open specification from Microsoft for implementing data parallelism directly in C++. It is intended to make programming GPUs easy for the developer by supporting a range of expertise from none (in which case the system does its best) to being more finely controllable, but still portable. In Microsoft's implementation, code that cannot be run on GPUs will fall back onto one or more CPUs instead and use SSE instructions.[citation needed] The Microsoft implementation is included in Visual Studio 2012, including debugger and profiler support.

The initial C++ AMP release from Microsoft requires at least Windows 7 or Windows Server 2008 R2.[1] As C++ AMP is an open specification it is expected that in time implementations outside Microsoft will appear; one early example of this is Shevlin Park, Intel's experimental implementation of C++ AMP on Clang/LLVM and OpenCL.[2]

On November 12, 2013 the HSA Foundation announced a C++ AMP compiler that outputs to OpenCL, Standard Portable Intermediate Representation (SPIR), and HSA Intermediate Language (HSAIL) supporting the current C++ AMP specification.[3] The source is available at https://github.com/RadeonOpenCompute/hcc. C++ AMP support is considered obsolete and the current ROCm 1.9 series will be the last to support it.[4]

The basic concepts behind C++AMP, like using C++ classes to express parallel and heterogeneous programming features, have been inspirational to the SYCL standard.

Features[edit]

Microsoft added the restrict(amp) feature, which can be applied to any function (including lambdas) to declare that the function can be executed on a C++ AMP accelerator. The compiler will automatically generate a compute kernel, saving the boilerplate of management and having to use a separate language. The restrict keyword instructs the compiler to statically check that the function uses only those language features that are supported by most GPUs, for example, void myFunc() restrict(amp) {…} Microsoft or other implementer of the open C++ AMP specification could add other restrict specifiers for other purposes, including for purposes that are unrelated to C++ AMP.

Beyond the new language feature, the rest of C++ AMP is available through the <amp.h> header file in the concurrency namespace. The key C++ AMP classes are: array (container for data on an accelerator), array_view (wrapper for data), index (N-dimensional point), extent (N-dimensional size), accelerator (computational resource, such as a GPU, on which to allocate memory and execute), and accelerator_view (view of an accelerator). There is also a global function, parallel_for_each, which you use to write a C++ AMP parallel loop.

See also[edit]

References[edit]

  • ^ "Bringing C++AMP Beyond Windows via CLANG and LLVM". Retrieved January 9, 2014.
  • ^ "Home · RadeonOpenCompute/HCC Wiki". GitHub.
  • Further reading[edit]

    External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=C%2B%2B_AMP&oldid=1088778181"

    Categories: 
    C++ libraries
    GPGPU libraries
    Parallel computing
    Hidden categories: 
    Articles needing additional references from February 2012
    All articles needing additional references
    All articles with unsourced statements
    Articles with unsourced statements from August 2014
     



    This page was last edited on 20 May 2022, at 02:16 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki