Skip to content

bdmoore1/vscode-environment-and-launch-configurator

 
 

Repository files navigation

Environment and Launch Configurator for Intel oneAPI Toolkits


This extension configures the system environment and settings for Intel oneAPI toolkits and their products.


Use

Before you start, make sure that you have oneAPI BaseKit or other installed. Note: To use the environment features in Windows, you need to have PowerShell 7 or higher. For more information, see sections Intel oneAPI toolkits and components and Other extensions for oneAPI.

  • Launch the command palette to access the options:

    • Press Ctrl+Shift+P ( or View -> Command Palette… ) and type Intel oneAPI.
  • Adding and removing oneAPI environments for local and remote cases:

    • Choose the option Intel oneAPI: Set oneAPI environment.
    • All tasks, launches, and terminals created after that will contain the oneAPI environment.
    • To delete the oneAPI environment choose the option Intel oneAPI: Unset oneAPI environment
  • Preparing tasks from make / cmake files:

    • Choose the option Intel oneAPI: Generate tasks and follow the prompts to add targets from your make/cmake oneAPI project. If the oneAPI environment is not present it will be automatically added to the current VSCode instance.
    • Now you can run targets from make/cmake in the oneAPI environment via Terminal -> Run task...
  • Preparing launch configuration for running/debugging oneAPI projects:

    • Choose the option Intel oneAPI: Generate launch configurations and follow the prompts. If the oneAPI environment is not present it will be automatically added to the current VSCode instance.
    • The result is a configuration for debugging and running that uses the gdb-oneapi debugger and is available in the Run tab ( or Ctrl+Shift+D ).

Intel oneAPI toolkits and components

Other extensions for oneAPI

How to use IntelliSense for oneAPI code

  1. Make sure that the C/C++ extension is already installed.
  2. Press Ctrl+Shift+P and choose the option C/C++ Edit Configurations (JSON). As a result, a c_cpp_properties.json file will be created in .vscode folder.
  3. Edit the file so that it looks like in the example:
   {
   "configurations": [
           {
               "name": "Linux",
               "includePath": [
                   "${workspaceFolder}/**",
                   "/opt/intel/oneapi/**"
               ],
               "defines": [],
               "compilerPath": /opt/intel/oneapi/compiler/latest/linux/bin/dpcpp",
               "cStandard": "c17",
               "cppStandard": "c++17",
               "intelliSenseMode": "linux-clang-x64"
           }
       ],
       "version": 4
           }
  1. If necessary, replace the path to the oneAPI components with the one that is relevant for your installation folder.
  2. IntelliSense for oneAPI is ready.

Contributing

Install Visual Studio Code (at least version 1.46) and open this project within it. You may also need yarn installed, and of course node+npm

npm install -g yarn
yarn install
code .

At this point you should be able to run the extension in the "Extension Development Host"

License

This extension is released under MIT.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.6%
  • JavaScript 0.4%