This page contains the most frequently asked questions about the Intel® DPC++ Compatibility Tool.
Question:
How do I enable the Intel® DPC++ Compatibility Tool to migrate source files that are using C++11, or newer C++ standard features (for example std::declval) on Linux* and Windows*?
Answer:
On Linux, the default C++ standard for the Intel® DPC++ Compatibility Tool's parser is C++98, with some C++11 features accepted. If you want to enable other C++11 or newer standard features in the Intel® DPC++ Compatibility Tool, you need to add an option (for example: --extra-arg="-std=c++11" to the command line. The supported values are:
On Windows, the default C++ standard for the Intel® DPC++ Compatibility Tool's parser is C++14. If you want to enable C++17 features in the Intel® DPC++ Compatibility Tool, you need to add the option --extra-arg="-std=c++17" to the command line.
Question:
How do I use the Intel® DPC++ Compatibility Tool to migrate files on Windows when using a CMake project?
Answer:
For a CMake project on a Windows OS, you can use CMake to generate Microsoft Visual Studio* project files (vcxproj files). Then:
-OR-
Question:
Sometimes, when I try to migrate a batch of files with dpct --in-root=srcdir --out-root=dstdir *.cu, the Intel® DPC++ Compatibility Tool reports errors like, error: unknown type name. How can I fix this issue?
Answer:
The problem may be caused by files in the *.cu list, which can be used as header files (included with an #include statement) and are not supposed to be parsed as a standalone file. In this case, the Intel® DPC++ Compatibility Tool reports an error if it cannot parse the file because the file depends on the definitions/declarations in other files. Use one of the methods below to migrate your content:
Question:
How does the Intel® DPC++ Compatibility Tool format the migrated code?
Answer:
The Intel® DPC++ Compatibility Tool provides two options: --format-range and --format-style to control the format of migrated code.
If input source code is well formatted, the Intel® DPC++ Compatibility Tool will use default options settings --format-range and --format-style to format the resulting code.
If input source code is not well formatted (for example, the tool detects mixed use of tabs and spaces or mixed indents) you can do one of the following: