SYCL Kernels API#

Supported C++ Standard Library APIs and Algorithms#

oneDPL defines a subset of the C++ Standard library APIs for use in DPC++ kernels. These APIs can be employed in the kernels similarly to how they are employed in code for a typical CPU-based platform.

Function Objects#

The oneDPL function objects are defined in the <oneapi/dpl/functional> header, in namespace oneapi::dpl.

namespace oneapi {
namespace dpl {
    struct identity
    {
        template <typename T>
        constexpr T&&
        operator()(T&& t) const noexcept;
    };
}
}

The oneapi::dpl::identity class implements an identity operation. Its function operator receives an instance of a type and returns the argument unchanged.