Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifications to header file and namespace sections #189

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading