Parallel Programming in Native Code

Parallel programming using C++ AMP, PPL and Agents libraries.

restrict(amp) restrictions part 7 of N – volatile and miscellaneous forbidden operators and statements

restrict(amp) restrictions part 7 of N – volatile and miscellaneous forbidden operators and statements

  • Comments 3

This post assumes and requires that you have read the introductory post to this series which also includes a table of content. With that out of the way let’s look at some restrictions for some statements, operators and the volatile qualifier.

Following is a list of statements or operators that are not allowed in an amp-restricted function:

  • dynamic_cast;
  • typeid operator
  • goto statements or labeled statements;
  • inline native assembly (asm) declarations;
  • function try blocks, try blocks, catch blocks, or throw;

Also, the volatile type qualifier is not supported in an amp restricted function because the semantics defined by C++ volatile memory cannot be safely emulated by the underlying Direct3D platform. This also means volatile member functions are not supported since a volatile member function actually means the this pointer is volatile, which is not supported.

Blog - Comment List MSDN TechNet
  • Loading...
Leave a Comment
  • Please add 3 and 3 and type the answer here:
  • Post