restrict(amp) restrictions part 6 of N – pointer operations and casting

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 restrictions with pointer operations and casting. Since pointers in C++ AMP are actually emulated on top of the DirectX 11 platform which does not…

0

Sample of 2D Triangle Rotation in C++ AMP

In my previous blog post on D3D interoperability with C++ AMP we looked at the APIs. In this blog post I will show a sample that uses those APIs The attached zipped file, contains a Visual Studio 11 project of DirectX 3D sample which displays the rotation animation of a 2D triangle object. The sample…

4

Interoperability between Direct 3D and C++ AMP

Hi, I am Charles Fu, a developer on the C++ AMP team. In this blog post, I will describe the C++ AMP Direct3D interoperability APIs. In my next blog post I will demonstrate how to build a simple DirectX 3D application, which renders the rotation animation of a 2D triangle. To explore the easy programmability…

0

restrict(amp) restrictions part 5 of N – identifier expressions

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 restrictions around identifier expressions. In an amp-restricted function, you cannot access any global or static variables (including static data members). This restriction is introduced…

6

How to measure the performance of C++ AMP algorithms?

Today I am going to present a way to measure the performance of C++ AMP algorithms. Specifically I am going to show you how to accurately measure elapsed time, and what you need to know while placing the timer in your code. In the examples below I am going to use high-resolution timer for C++…

8

High-resolution timer for C++

Howdy ho! My name is Simon Wybranski, I am a developer on the C++ AMP team! In this blog post I am going to present a high-resolution timer for measuring the performance of C++ AMP algorithms. There is nothing specific in it to C++ AMP, so it can be used to measure elapsed time of…

6

Using function objects instead of lambdas with C++ AMP

Most of the code samples shared by our team have been passing lambda expressions to the parallel_for_each call. Lambdas, which have been supported in VC++ since VS2010, are a new feature in C++11, which was published just over 2 months ago. There seems to be no good reason why you would not want to use…


tile_barrier in C++ AMP

C++ AMP offers a tiled model to help user take advantage of the fast and programmable cache on GPU hardware, which is exposed as tile_static memory in C++ AMP.  In this blog post, I will first dive into a synchronization mechanism for coordinating threads in a tile, and I will then describe the C++ AMP…

0

restrict(amp) restrictions part 4 of N – literals

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 restrictions around literals. In an amp-restricted function, an integer constant or floating point constant must be within the maximum allowable ranges of supported fundamental…

0

restrict(amp) restrictions part 3 of N – function declarators and calls

  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 restrictions around function declarators and calls. Function declarators with restrict(amp) For a function declarator with restrict(amp) (or restrict(amp, cpu)), besides the obvious rules…

7