Intel® oneAPI DPC++ Library Overview
Before You Begin
- Where to Find the Release
- New Features
- Fixed Issues
- Known Issues and Limitations
- A C++ compiler with support for OpenMP* 4.0 (or higher) SIMD constructs
- Depending on what parallel backend you want to use install either:
- Intel® oneAPI Threading Building Blocks (oneTBB) or Intel® Threading Building Blocks (Intel® TBB) 2019 and later
- A C++ compiler with support for OpenMP 4.5 (or higher)
- A C++ compiler with support for SYCL 2020
- 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.
- The definition of lambda functions used with parallel algorithms should not depend on preprocessor macros that makes it different for the host and the device. Otherwise, the behavior is undefined.
- When used within SYCL kernels or transferred to/from a device, a container class can only hold objects whose type meets SYCL requirements for use in kernels and for data transfer, respectively.
- Calling the API that throws exception is not allowed within callable objects passed to an algorithm.
- Fortransform_exclusive_scan,transform_inclusive_scanalgorithms, 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.
- exclusive_scanandtransform_exclusive_scanalgorithms may provide wrong results with vector execution policies when building a program with GCC 10 and using-O0option.
- The use of oneDPL together with the GNU C++ standard library (libstdc++) version 9 or 10 may lead to compilation errors (caused by oneTBB API changes). Using libstdc++ version 9 requires TBB version 2020 for the header file. This may result in compilation errors when using C++17 or C++20 and TBB is not found in the environment, even if its use in oneDPL is switched off. To overcome these issues, include oneDPL header files before the standard C++ header files, or disable parallel algorithms support in the standard library. For more information, please see Intel® oneAPI Threading Building Blocks (oneTBB) Release Notes.
- Theusing namespace oneapi;directive in a oneDPL program code may result in compilation errors with some compilers including GCC 7 and earlier. Instead of this directive, explicitly useoneapi::dplnamespace, or create a namespace alias.
- std::array::atmember function cannot be used in kernels because it may throw an exception; usestd::array::operatorinstead.
- Due to specifics of Microsoft* Visual C++, some standard floating-point math functions (includingstd::ldexp,std::frexp,std::sqrt(std::complex<float>)) require device support for double precision.
Build Your Code with oneDPL
- Set the environment variables for oneDPL and oneTBB.
- To avoid naming device policy objects explicitly, add the-fsycl-unnamed-lambdaoption.
dpcpp [-fsycl-unnamed-lambda] test.cpp [-ltbb|-fopenmp] -o test