Skip to content

Commit

Permalink
Clarifications to header file and namespace sections (#189)
Browse files Browse the repository at this point in the history
* Clarification to header file and namespace sections

* Add mention of the `CL/sycl.hpp` header and `cl::sycl` namespace for
compatibility with SYCL 1.2.1.
* Mention  sycl/ext/ and sycl/backend/ include paths under include files
section.

* Fix line lenth error
  • Loading branch information
AerialMantis authored Apr 27, 2024
1 parent b63cdc7 commit 46bda72
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
25 changes: 19 additions & 6 deletions source/header-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@
Copyright 2024 The Khronos Group Inc.
SPDX-License-Identifier: CC-BY-4.0
=============
Header File
=============
==============
Header Files
==============

SYCL provides one standard header file:
SYCL provides a single standard header file:

::

#include <sycl/sycl.hpp>

which needs to be included in every translation unit that uses the
SYCL programming API.
which needs to be included in every translation unit that uses the SYCL
programming API.

For compatibility with the earlier version; SYCL 1.2.1, SYCL also provides
another header file:

::

#include <CL/sycl.hpp>

which can be used in place of ``sycl/sycl.hpp``, providing all of the same SYCL
programming API, though it is recommended to use ``sycl/sycl.hpp``.

Extension headers are available in ``sycl/ext/`` include paths and backend-
specific headers are available in ``sycl/backend/`` include paths.

.. seealso:: |SYCL_SPEC_HEADER_FILES|
5 changes: 3 additions & 2 deletions source/namespaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
Namespaces
==========

Unless otherwise noted, all SYCL classes, constants, types and
functions should be prefixed with the ``sycl::`` namespace.
All SYCL classes, constants, types and functions are available in the
``sycl::`` namespace, unless the ``CL/sycl.hpp`` header is used in which case
they are all available in the ``cl::sycl::`` namespace.

All SYCL backend-specific functionality is made available in the
namespace ``sycl::<backend_name>`` where ``<backend_name>`` is the
Expand Down

0 comments on commit 46bda72

Please sign in to comment.