News for hackers. Stuff that matters.
Re:AFDS11: Microsoft Announces C++ AMP, Competitor to OpenCL by scott_s on Thursday June 16, 2011 @09:20AM (#2661110)
I don't know if it's accurate to say this is a competitor to OpenCL. We don't have full details, but I wouldn't be surprised if this was implemented using OpenCL. OpenCL is relatively low-level. It's quite un-friendly for developers to use directly. It's much more reasonable for compilers to generate it, or for libraries to build abstractions on top of it.

My dissertation work did a similar with with OpenMP-like syntax and semantics built on top of the Cell's native API: http://people.cs.vt.edu/~scschnei/cellgen/ (And, actually, my compiler generated code for a library that was a thin wrapper on top of the Cell's native API itself - it's so low-level that it was easier to have another layer of abstraction between my generated code and it.)

Re:AFDS11: Microsoft Announces C++ AMP, Competitor to OpenCL by panic on Thursday June 16, 2011 @11:15AM (#2661586)
OpenCL is a language designed for writing programs where performance is important. I'm not sure how you could abstract away from it or compile down to it without losing some control over the code's performance characteristics.

A compiler would be better off compiling directly to either native code (if running on a CPU) or something like PTX (for NVidia GPUs).

Re:AFDS11: Microsoft Announces C++ AMP, Competitor to OpenCL by scott_s on Thursday June 16, 2011 @11:26AM (#2661632)
You'll probably lose some performance, but you can also make disproportionately large productivity gains. Performance loss generally isn't the largest limitation, but rather expressivity. That is, by providing higher-level abstractions, you're also saying "this is how you need to write your computations." In other words, you define a programming model. If the problem you want to solve does not cleanly map to that programming model, then you can't use it.

We've been playing this game every since Fortran was first invented. Yeah, you probably could get better performance if you wrote your application one level of abstraction lower, but once you get a sufficiently sophisticated compiler, the performance benefit is marginal compared to the programming time and effort. Further, libraries tend not to be written directly in assembly, and will often rely on other libraries. I could see implementing something similar to what MS showed purely as a C++ library.

Re:AFDS11: Microsoft Announces C++ AMP, Competitor to OpenCL by wmf on Thursday June 16, 2011 @12:26PM (#2661935)
MS doesn't do OpenCL; don't you mean you're not surprised if it's implemented using DirectCompute?