diff --git a/.gitignore b/.gitignore index 150f6d9..79967d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ out node_modules -.DS_Store \ No newline at end of file +.DS_Store +*.vsix \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d679680..a5381c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,12 @@ ## Version 0.1.3: October 29, 2017 Added command `OpenCL: Info` to show OpenCL platforms/devices info. -The command is activated when a file with any of the supported extensions (`.cl`,`.ocl`,`.c`,`.cpp`) is opened. + +![vscode-opencl-cmd-oclinfo](https://raw.githubusercontent.com/Galarius/vscode-opencl/master/images/vscode-opencl-cmd-oclinfo.gif) *Only Win32 and macOS are supported.* +*Requirements: OpenCL drivers and runtime libraries.* ## Version 0.1.2: October 3, 2017 diff --git a/README.md b/README.md index b7e1296..458dd6e 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,28 @@ This extension adds: * Code Snippets for some host and device functions * Command `OpenCL: Info` to show OpenCL platforms/devices info. (`linux` is not supported yet) -![screen-autocomplete](https://raw.githubusercontent.com/Galarius/vscode-opencl/master/images/vscode-opencl-autocomplete.gif) -*Syntax Highlighting, Auto-Completion* - -![screen-snippet](https://raw.githubusercontent.com/Galarius/vscode-opencl/master/images/vscode-opencl-snippet.gif) -*Code Snippets* +|![screen-autocomplete](https://raw.githubusercontent.com/Galarius/vscode-opencl/master/images/vscode-opencl-autocomplete.gif)| +|-| +|*Syntax Highlighting, Auto-Completion*| +|![screen-snippet](https://raw.githubusercontent.com/Galarius/vscode-opencl/master/images/vscode-opencl-snippet.gif)| +|*Code Snippets*| +|![vscode-opencl-cmd-oclinfo](https://raw.githubusercontent.com/Galarius/vscode-opencl/master/images/vscode-opencl-cmd-oclinfo.gif)| +|*OpenCL platforms/devices info*| +|| ## Prerequisites +*[Required]* + * [Visual Studio Code](https://code.visualstudio.com) +*[Optional]* + +In order to run command `OpenCL: Info` on Windows: + +* Check that you have a device that supports OpenCL +* Make sure your OpenCL device driver is up to date. You can download drivers manually: [Intel](https://software.intel.com/en-us/articles/opencl-drivers), [NVidia](http://www.nvidia.com/Download/index.aspx), [AMD](http://support.amd.com/en-us/download) + ## How To Install This Extension ### **I.** Install from the Extensions pane @@ -73,7 +85,17 @@ Here's a quick guide on `pull requests`: some feedback, but if you haven't heard back from me after a couple of days, feel free to leave a comment on the pull request. -## OpenCL for Visual Studio Code Change Log +## FAQ + +> Why `OpenCL: Info` command shows error? + +The command needs OpenCL drivers and run-time libraries to be installed on your system. They can be obtained e.g. from [Intel](https://software.intel.com/en-us/articles/opencl-drivers). + +> I am on Linux. Why can't I use `OpenCL: Info` command? + +It is not supported for now, but will be in future. + +## Change Log See [CHANGELOG.md](https://marketplace.visualstudio.com/items/galarius.vscode-opencl/changelog) diff --git a/images/vscode-opencl-cmd-oclinfo.gif b/images/vscode-opencl-cmd-oclinfo.gif new file mode 100644 index 0000000..598eaa9 Binary files /dev/null and b/images/vscode-opencl-cmd-oclinfo.gif differ diff --git a/package.json b/package.json index 647fc23..61c2402 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,8 @@ "activationEvents": [ "onLanguage:opencl", "onLanguage:c", - "onLanguage:cpp" + "onLanguage:cpp", + "onCommand:opencl.info" ], "main": "./out/extension", "contributes": { diff --git a/src/oclinfo.ts b/src/oclinfo.ts index 0c082ff..1f3d3cf 100644 --- a/src/oclinfo.ts +++ b/src/oclinfo.ts @@ -25,7 +25,7 @@ function execute(command: string): Promise { return result.stdout; }).fail(function(error) { console.error("Error: " + error); - vscode.window.showErrorMessage("Error: " + error); + vscode.window.showErrorMessage(error); }).progress(function(childProcess) { console.log("Command: " + command + " running..."); }); @@ -52,7 +52,7 @@ export function oclinfoDumpAll() { vscode.window.showTextDocument(doc); }, (error: any) => { console.error(error); - vscode.window.showErrorMessage("Error: " + error); + vscode.window.showErrorMessage(error); }); }); } else {