共用方式為


restrict(amp) restrictions part 0 of N – introduction

Hi, I am Lingli Zhang, a developer on the C++ AMP team and this is the first in a series of posts on C++ AMP restrictions.

In a previous post, we have introduced a key new language feature introduced with C++ AMP -- restrict specifiers, a new part of a function signature, which can be used by the compiler to enforce a language subset and special code generation for the restriction options specified by you in your code. As mentioned in that blog post, in the Visual C++ compiler shipping with Visual Studio 12, the only other option you can specify aside from the default cpu option is the amp option. restrict(amp) implies a relatively small set of restrictions that mostly reflect the current limitations of GPU hardware and of the underlying DirectX 11 programming model. Some of these restrictions may be relaxed for the future release as the hardware and the underlying platform evolves. In the next several posts, I will provide more details on restrictions and limitations imposed by restrict(amp) , and explain the source of the restrictions and other nuances.

As I publish new blog posts, I will come back and update this blog post so you have one central place with the table of contents of all restrictions. Enjoy!

  1. Fundamental types
  2. Compound types
  3. Function declarators and calls
  4. Literals
  5. Identifier expressions
  6. Pointer operations and casting
  7. Volatile and miscellaneous forbidden operators and statements
  8. Restricted lambdas exceptions
  9. Lambda expression capture rules
  10. tile_static

 

Note on Developer Preview vs Beta

In the VS 11 Developer Preview restrict(amp) was actually written as restrict(direct3d) . That is no longer the case.