oneAPI DPC++ Library (oneDPL) Overview

Parallel API can be used with the C++ Standard Execution Policies to enable parallelism on the host.

The oneAPI DPC++ Library (oneDPL) is implemented in accordance with the oneDPL Specification.

To support heterogeneity, oneDPL works with the Data Parallel C++ (DPC++) API. More information can be found in the DPC++ Specification.

Before You Begin

Visit the oneAPI DPC++ Library (oneDPL) Release Notes page for:

  • Where to Find the Release

  • Overview

  • New Features

  • Fixed Issues

  • Known Issues and Limitations

Install the Intel® oneAPI Base Toolkit (Base Kit) to use oneDPL.

All oneDPL header files are in the oneapi/dpl directory. To use the oneDPL API, include the corresponding header in your source code with the #include <oneapi/dpl/…> directive. oneDPL introduces the namespace oneapi::dpl for most its classes and functions.

To use tested C++ standard APIs, you need to include the corresponding C++ standard header files and use the std namespace.


C++11 is the minimal version of the C++ standard that oneDPL requires. That means, any use of oneDPL requires at least a C++11 compiler. Some APIs of the library may require a higher version of C++. To call Parallel API with the C++ standard policies, you need to install the following software:

  • A C++ compiler with support for OpenMP* 4.0 (or higher) SIMD constructs

  • oneAPI Threading Building Blocks (oneTBB) or Intel® Threading Building Blocks (Intel® TBB) 2019 and later

To use Parallel API with the DPC++ execution policies, you need to install the following software:

  • A C++ compiler with support for SYCL* 2020


When called with DPC++ execution policies, oneDPL algorithms apply the same restrictions as DPC++ does (see the DPC++ specification and the SYCL specification for details), such as:

  • Adding buffers to a lambda capture list is not allowed for lambdas passed to an algorithm.

  • Passing data types, which are not trivially copyable, is only allowed via USM, but not via buffers or host-allocated containers.

Known Limitations

For transform_exclusive_scan, transform_inclusive_scan algorithms, the result of the unary operation should be convertible to the type of the initial value if (one is provided), otherwise it is convertible to the type of values in the processed data sequence: (std::iterator_traits<IteratorType>::value_type).

Build Your Code with oneDPL

Follow the steps below to build your code with oneDPL:

  1. To build with the Intel® oneAPI DPC++/C++ Compiler, see the Get Started with the Intel® oneAPI DPC++/C++ Compiler for details.

  2. Set the environment variables for oneDPL and oneTBB.

  3. To avoid naming device policy objects explicitly, add the -fsycl-unnamed-lambda option.

Below is an example of a command line used to compile code that contains oneDPL parallel algorithms on Linux* (depending on the code, parameters within [] could be unnecessary):

dpcpp [-fsycl-unnamed-lambda] test.cpp [-ltbb] -o test