|
1 | 1 | .. SPDX-FileCopyrightText: 2019-2022 Intel Corporation
|
| 2 | +.. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project. |
2 | 3 | ..
|
3 | 4 | .. SPDX-License-Identifier: CC-BY-4.0
|
4 | 5 |
|
| 6 | +General Information |
| 7 | +------------------- |
| 8 | + |
| 9 | +This section describes the most general functionality of |dpl_full_name| (oneDPL) |
| 10 | +such as namespaces, versioning, etc. |
| 11 | + |
5 | 12 | Namespaces
|
6 |
| ----------- |
| 13 | +++++++++++ |
7 | 14 |
|
8 | 15 | oneDPL uses ``namespace oneapi::dpl`` and a shorter variant ``namespace dpl`` for all
|
9 | 16 | functionality including parallel algorithms, oneDPL execution policies, etc.
|
10 | 17 | For the subset of the standard C++ library for kernels, the standard class
|
11 | 18 | and function names are also aliased in ``namespace oneapi::dpl``.
|
12 | 19 |
|
13 | 20 | oneDPL uses nested namespaces for the functionality aligned with the C++ standard.
|
14 |
| -The names of those namespaces are the same as in ``namespace std``. For example, |
15 |
| -oneDPL execution policies are provided in ``namespace oneapi::dpl::execution``. |
| 21 | +The names of those namespaces are the same as for their analogues in ``namespace std``. |
| 22 | +[*Example*: oneDPL execution policies are provided in ``namespace oneapi::dpl::execution``. -- *end example*] |
| 23 | + |
| 24 | +Header Files |
| 25 | +++++++++++++ |
| 26 | + |
| 27 | +The oneDPL header files are provided under the ``oneapi/dpl/`` include path, |
| 28 | +which must explicitly precede oneDPL header file names in ``#include`` directives. |
| 29 | + |
| 30 | +Following the naming convention for the C++ standard library header files, |
| 31 | +the oneDPL header files have no extension suffix in their names. |
| 32 | + |
| 33 | +A oneDPL header file automatically includes the C++ standard library header file |
| 34 | +which name matches that of the oneDPL header file without the include path prefix. |
| 35 | +[*Example*: ``#include <oneapi/dpl/version>`` automatically includes ``<version>`` |
| 36 | +if that is available. -- *end example*] |
| 37 | + |
| 38 | +Version Information |
| 39 | ++++++++++++++++++++ |
| 40 | + |
| 41 | +A oneDPL implementation must define the following preprocessor macro representing |
| 42 | +the version of the oneDPL specification that the implementation is compliant with. |
| 43 | + |
| 44 | +.. code:: cpp |
| 45 | +
|
| 46 | + // Defined in <oneapi/dpl/version> |
| 47 | +
|
| 48 | + #define ONEDPL_SPEC_VERSION /*implementation-defined*/ |
| 49 | +
|
| 50 | +The ``ONEDPL_SPEC_VERSION`` macro must be defined to the decimal literal whose value equals to |
| 51 | +*major-spec-version* * 100 + *minor-spec-version*, where *major-spec-version* and *minor-spec-version* |
| 52 | +are the major and the minor versions of the latest fully supported specification. |
| 53 | +[*Example*: ``#define ONEDPL_SPEC_VERSION 104`` for the oneDPL specification 1.4. -- *end example*] |
0 commit comments