Many notebooks on the market feature switchable graphics, that is, a notebook with an Intel CPU with built-in HD Graphics technology, as well as an additional AMD HD Radeon GPU or nVidia GeForce GPU. During normal usage, just the Intel HD Graphics is enabled, as it consumes less power, and the high-performance AMD or nVidia GPU is enabled only when 3D intensive applications are started.

When developing a GPGPU application, in this example using C++ AMP with Microsoft Visual C++ 2012, you must check that the high-performance GPU is running your GPGPU kernels, or the resulting performance will be so poor, that you will wonder what the hype about GPGPU is all about. To ensure that the high-performance AMD GPU is running your code, right click on the desktop and click on Setup switchable graphics

The AMD Catalyst Control Center pops up, click on the Browse button to search for the application you have developed:

TimeMedianGPU is the release build of a demo app built with C++ AMP to test the performance of GPGPU processing

Now the selected application appear in the list of Other Applications, click on the button on the right until it becomes red and with the High performance caption.

That's it, now TimeMedianGPU.exe in the given Release directory will run on the AMD GPU, and you will see a huge speed boost compared to emulation on the CPU.

What about debug builds? With C++ AMP, debug code runs on an emulated accelerator called the reference accelerator; it is very slow, even slower that running serial code on the CPU, but it is accurate and complete. So there is no need to force the GPU to be used with debug builds, as the reference accelerator will be used.

Related articles

Latest Articles

Standing out of the pack starts by being visible, and being noticed by the right group of professionals. No matter how good your profile is, it is lost in a sea of similar profiles, so you need to show up and start attracting

There are many ways to extract data elements from web pages, almost all of them prettier and cooler than the method proposed here, but as we are in an hurry, let's get that data quickly, ok? Suppose we have to extract the

One of the most common roadblocks when scraping the content of web sites is getting the full contents of the page, including JS-generated data elements (probably, the ones you are looking for). So, when using CEFSharp to scrape

Two good news: file I/O is unit-testable, and it is surprisingly easy to do. Let's see how it works!
A software no-one asked for
First, we need a piece of software that deals with files and that has to be unit-tested. The

If you encounter the following error when pulling a repository in SourceTree:
VirtualAlloc pointer is null, Win32 error 487
it is due to to the Cygwin system failing to allocate a 5 MB large chunk of memory for its heap at