One of the advantages of SYCL (heterogeneous computing by Khronos) is claimed that the source code is standard C++17 source code. I am not sure how do I understand this. Is it strict statement or just marketing?
It is clear that you need specific compiler (Intel DPC++, AdaptiveCpp, etc.) to generate binary code for GPUs, FPGAs and your target computational devices. But are there other reasons to have specific SYCL compiler?
Let me put it in other way. If the source is claimed to be standard C++ then it should be possible to compile the source on any compiler. I don't mean that the result to be fast or parallel. But #include <sycl/sycl.hpp>
should be enough to compile the application, if it is claimed to be standard C++. So, is it possible to do?
I have not found any evidence that it is possible, so should I understand that SYCL source code only looks like standard C++?
SYCL is a specification, not an implementation, in the same way that C++ is. They claim there can be an implementation of SYCL that is purely a library. Presumably that library will use platform-specific features to implement particular backends.
From the SYCL 2020 specification
SYCL is designed to be as close to standard C++ as possible. In practice, this means that as long as no dependence is created on SYCL’s integration with the underlying implementation, a standard C++ compiler can compile SYCL programs and they will run correctly on a host CPU. Any use of specialized low-level features can be masked using the C preprocessor in the same way that compiler-specific intrinsics may be hidden to ensure portability between different host compilers.
SYCL is designed to allow a compilation flow where the source file is passed through multiple different compilers, including a standard C++ host compiler of the developer’s choice, and where the resulting application combines the results of these compilation passes. This is distinct from a single-source flow that might use language extensions that preclude the use of a standard host compiler. The SYCL standard does not preclude the use of a single compiler flow, but is designed to not require it. SYCL can also be implemented purely as a library, in which case no special compiler support is required at all.