Questions tagged [c++-amp]

C++ Accelerated Massive Parallelism (C++ AMP) an API for GPGPU/APU/multi-core programming for C++ developers. It can target both discrete and integrated GPUs on Windows and Linux.

C++ AMP accelerates the execution of C++ code by taking advantage of the data-parallel hardware that's commonly present as a graphics processing unit (GPU) either integrated into the CPU or on a discrete graphics card. The C++ AMP programming model includes support for multidimensional arrays, indexing, memory transfer, and tiling. It also includes a mathematical function library. You can use C++ AMP language extensions to control how data is moved from the CPU to the GPU and back.

C++ AMP is an open specification with implementations on Windows with Visual C++ and DirectX and Linux with CLANG/LLVM and OpenCL. It will target GPUs which support DirectX 11 or OpenCL.

162 questions
34
votes
4 answers

What is the current status of C++ AMP

I am working on high performance code in C++ and have been using both CUDA and OpenCL and more recently C++AMP, which I like very much. I am however a little worried that it is not being developed and extended and will die out. What leads me to this…
JoeTaicoon
  • 1,117
  • 8
  • 20
32
votes
5 answers

Does C++11 add the C99 restrict specifier? If not, why not?

restrict is a C99 feature which is getting a lot of attention lately by allowing the compiler to perform "previously-fortran-only" optimizations to pointers. It's also the same keyword announced by Microsoft recently to be the underpinnings of the…
Billy ONeal
  • 97,781
  • 45
  • 291
  • 525
28
votes
2 answers

Will GCC support C++ AMP

Does anyone know if there are any plans to develop support in g++ (GCC) for the new C++ AMP standard which was released recently by Microsoft as an open specification? I see someone is already asking about Intel support in their forums. But I…
flipchart
  • 6,443
  • 4
  • 27
  • 51
15
votes
2 answers

Confusion on CUDA/openCL and C++ AMP

I read that Microsoft is closely working with Nvidia to improve AMP performances. But my question is: is AMP a CUDA-replace by Microsoft? Or does AMP use CUDA drivers when a NVIDIA CUDA video card is available? Is AMP an openCL substitute? I'm still…
Marco A.
  • 41,192
  • 25
  • 117
  • 233
9
votes
1 answer

C++ AMP with fast GPUs slower than CPU

I'm just starting to learn C++ AMP and I've obtained a few examples that I've built with the VS 2012 RC, but I'm finding that the performance of the GPU is slower than the CPU. For instance, the examples by Kate Gregory:…
CarbonTwelve
  • 91
  • 1
  • 5
8
votes
4 answers

Concurrency and memory models

I'm watching this video by Herb Sutter on GPGPU and the new C++ AMP library. He is talking about memory models and mentions Weak Memory Models and then Strong Memory Models and I think he's referring to read/write ordering etc, but I am however not…
Tony The Lion
  • 57,181
  • 57
  • 223
  • 390
7
votes
1 answer

Is restrict(amp) more restrictive than CUDA kernel code?

In C++ AMP, kernel functions or lambdas are marked with restrict(amp), which imposes severe restrictions on the allowed subset of C++ (listed here). Does CUDA allow any more freedom on the subset of C or C++ in kernel functions?
Eugene
  • 4,579
  • 1
  • 16
  • 29
7
votes
1 answer

Will C++ AMP run on a machine without a compatible GPU?

I understand that C++ AMP is accelerated by GPUs that support DirectX 11. However, my question is, if the compiled C++ AMP program is run on a machine without a DirectX 11 compatible GPU, what happens? Does it get emulated by some software…
Jonathan DeCarlo
  • 2,718
  • 1
  • 16
  • 24
5
votes
3 answers

C++ AMP in Visual Studio 2015: Compiler/runtime bug or buggy sample?

I would like to try out the following C++ AMP code sample from Microsoft's documentation: (Second code sample on https://msdn.microsoft.com/en-us/library/hh265136.aspx, slightly adapted to turn it into a program): #include "stdafx.h" #include…
Morty
  • 1,666
  • 1
  • 12
  • 21
5
votes
1 answer

Processing large arrays (65536+ elements) using C++ AMP

I'm having trouble processing large arrays (more than 65536 elements) in C++ AMP. I'm using C++ amp to calculate the normal, tangent and bitangent vectors for a list of polygons. The input consists of an array of positions (3 floats per position),…
5
votes
1 answer

How can I run tasks on the CPU and a GPU device concurrently?

I have this piece of code that is as profiled, optimised and cache-efficient as I am likely to get it with my level of knowledge. It runs on the CPU conceptually like this: #pragma omp parallel for schedule(dynamic) for (int i = 0; i <…
quant
  • 17,534
  • 24
  • 93
  • 186
5
votes
1 answer

Is the C++ AMP library useful from F#?

I'm experimenting with the C++ AMP library in F# as a way of using the GPU to do work in parallel. However, the results I'm getting don't seem intuitive. In C++, I made a library with one function that squares all the numbers in an array, using…
FSharpN00b
  • 872
  • 1
  • 7
  • 17
5
votes
1 answer

Default parameters to restrict(amp) functions

The following code fails to compile. The error messages are : Error 1: error C3930: 'foo' : no overloaded function has restriction specifiers that are compatible with the ambient context '' Error 2: error C2660: 'f1' : function does not take 0…
keveman
  • 8,137
  • 1
  • 36
  • 45
5
votes
1 answer

Best practices for string processing on the GPU?

I was wondering just how realistic is it to process strings, rather than numerics, on the GPU? Specifically, what I'm interested in is using C++ AMP to perform comparisons between an array of strings and a target string. I've started with basics…
Dmitri Nesteruk
  • 20,962
  • 21
  • 90
  • 152
4
votes
4 answers

When is a call to "synchronize()" not necessary in C++ AMP?

Background: For a C++ AMP overview, see Daniel Moth's recent BUILD talk. Going through the initial walk-throughs here, here, here, and here. Only in that last reference do they make a call to array_view.synchronize(). In these simple examples, is a…
David Cuccia
  • 3,174
  • 2
  • 23
  • 34
1
2 3
10 11