Skip to content

Commit

Permalink
Cosmetic improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
akukanov committed Oct 3, 2024
1 parent f3b68a0 commit 0c955d7
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,36 +197,35 @@ function overload resolution:
struct is_execution_policy { /*see below*/ };
template <class T>
inline constexpr bool is_execution_policy_v = oneapi::dpl::is_execution_policy<T>::value;
constexpr bool is_execution_policy_v = oneapi::dpl::is_execution_policy<T>::value;
namespace execution {
template <class T>
struct is_execution_policy { /*see below*/ };
template <class T>
inline constexpr bool is_execution_policy_v = oneapi::dpl::execution::is_execution_policy<T>::value;
constexpr bool is_execution_policy_v = oneapi::dpl::execution::is_execution_policy<T>::value;
}
}
}
``oneapi::dpl::is_execution_policy`` and ``oneapi::dpl::execution::is_execution_policy`` must be treated as name aliases
to the same class template. It is unspecified in which namespace the underlying class template and its specializations
are defined.

``is_execution_policy<T>`` must have the characteristics of ``std::true_type`` if ``T`` is one of the above specified
or implementation-defined execution policy types, otherwise it must have the characteristics of ``std::false_type``.
Following the C++ Standard, ``is_execution_policy<T>`` does not automatically strip references and cv-qualifiers
from its template argument. [*Note*: Use it with ``std::decay_t<T>`` or similar type transformation utilities. -- *end note*]

.. note::
The ``oneapi::dpl::execution::is_execution_policy`` class originated in the oneDPL specification version 1.0,
while ``oneapi::dpl::is_execution_policy`` has been added later to better align with the C++ standard.

For writing new code, use of the type trait utilities in ``namespace oneapi::dpl`` is strongly recommended. Those
in ``namespace oneapi::dpl::execution`` are provided for backward compatibility and may be deprecated in the future.

``is_execution_policy<T>`` must have the characteristics of ``std::true_type`` if ``T`` is one of the above specified or
implementation-defined oneDPL execution policy types, otherwise it must have the characteristics of ``std::false_type``.
Following the C++ Standard, ``is_execution_policy<T>`` does not automatically strip references and cv-qualifiers from
its template argument. [*Note*: Use it with ``std::decay_t<T>`` or similar type transformation utilities. -- *end note*]

.. _`C++ Standard`: https://isocpp.org/std/the-standard
.. _`SYCL`: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html

0 comments on commit 0c955d7

Please sign in to comment.