Skip to content

Commit d49df13

Browse files
committed
Change behavior for <sycl/sycl.hpp>
Require the source string to `#include <sycl/sycl.hpp>` in order to get the content of that header. Clarify that this header and other standard headers are available even without the `include_files` property.
1 parent 56864a8 commit d49df13

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,6 @@ may only be submitted to a queue that shares the same context.
201201
The bundle's set of associated devices is the set of devices contained in
202202
`ctxt`.
203203

204-
When the source language is `source_language::sycl`, the `source` string must
205-
not `#include <sycl/sycl.hpp>`.
206-
Instead, the device-side SYCL APIs are implicitly declared, and the source code
207-
may use these APIs without including this header.
208-
209204
_Returns:_ The newly created kernel bundle, which has `ext_oneapi_source`
210205
state.
211206

@@ -348,6 +343,21 @@ _Name_ is `foo.h`.
348343
If such an entry is found, the compiler uses the associated _Content_ as the
349344
content of the include file.
350345

346+
When the source language is `source_language::sycl`, the following header files
347+
are implicitly available.
348+
Therefore, the source string may `#include` these even without defining their
349+
content via the `include_files` property:
350+
351+
* `<sycl/sycl.hpp>`;
352+
* The {cpp} standard library headers;
353+
* The SYCL backend headers `"sycl/backend/<backend_name>.hpp"` for any backends
354+
that the implementation supports; and
355+
* Any SYCL extension headers in "sycl/ext" for extensions that the
356+
implementation supports.
357+
358+
The include files defined via the `include_files` property are searched first,
359+
before these implicitly available headers.
360+
351361
_Effects (1):_ Constructs an `include_files` property with a single (_Name_,
352362
_Content_) pair.
353363

0 commit comments

Comments
 (0)