Gruenke,Matt
-----Original Message----- From: Boost [mailto:boost-bounces <at> lists.boost.org] On Behalf Of Kyle Lutz Sent: Sunday, December 28, 2014 14:42 To: boost <at> lists.boost.org List Subject: Re: [boost] [compute] review
On Sun, Dec 28, 2014 at 1:54 AM, Gruenke,Matt wrote:
Others libraries/frameworks (such as SYCL, Bolt, C++AMP, OpenACC, etc.) are all dependent on either a special compiler or special compiler
extensions.
According to Khronos, that's incorrect.
The provisional specification includes the following features:
* Specifications for creating C++ template libraries and compilers using the C++11 standard
* Easy to use, production grade API - built on-top of OpenCL and SPIR(tm)
* Compatible with standard CPU C++ compilers across multiple platforms, ^^^^^^^^^^ ^^^^ ^^^^^^^^ ^^^ ^^^ ^^^^^^^^^ as well as enabling new SYCL device compilers to target OpenCL devices
* Asynchronous, low-level access to OpenCL features for high performance and low-latency - while retaining ease of use
Slides 14 and 15 of this slidedeck [0] show SYCL device compilers. SYCL code compiles using a standard C++11 compiler. To compile SYCL code however you need "either a special compiler or special compiler extensions". Codeplay calls this "Shared Source Programming Model", you can learn more about it from slides 22 onwards in this slide deck [1]. It is the same thing CUDA is doing since its initial release. But that is not unexpected at all. I don't think there is a technique to generate kernel code from command_group(myQueue, [&]() { // Data accessors // [...] // Kernel parallel_for(count, kernel_functor([ = ](id<> item) { int i = item.get_global(0); r[i] = a[i] + b[i] + c[i]; })); }); within standard C++11. You need a second compiler or an extension. Boost.Compute can do most things SYCL can do - except you don't need anything but a regular C++ compiler and the OpenCL library. [0] http://tinyurl.com/q7f5nm4 [1] http://tinyurl.com/nffyyon