I'm trying to start playing around with the <amp.h>
library. But when I type #include amp.h
, I get an error saying cannot open source file <amp.h>
. Is there something special I need to do to make this available?
#include <stdio.h>
#include <tchar.h>
#include <amp.h>
C++ AMP requires not only the amp.h header file, but a new compiler (in order to understand the restrict keyword, for example). The Developer Preview of VS 11 (either the one you can download onto a Windows 7 machine or the one that comes with the Developer Preview image of Windows 8) has the compiler you need. Your existing copy of VS 2010 (or whatever) does not. Getting the header file into your include path won't be enough. If you have the right compiler, you will discover that amp.h is on your include path already.
Check out this April 2012 MSDN Magainze Article for more info on C++ AMP