ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

CUDA C++

by harrism ST2/ST3

CUDA C++ package for Sublime Text 2 & 3

Details

Installs

  • Total 18K
  • Win 7K
  • OS X 4K
  • Linux 7K
May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11
Windows 3 4 6 3 6 7 0 6 5 6 6 9 6 8 4 2 1 6 9 3 2 2 6 6 10 6 4 7 2 1 8 9 5 9 7 6 7 13 5 11 1 7 4 6 8 6
OS X 1 1 4 4 3 2 1 4 0 4 3 6 3 1 2 3 3 4 3 0 5 1 6 3 1 4 2 2 2 3 7 5 0 5 0 4 6 1 3 5 3 3 4 2 5 2
Linux 3 5 6 5 3 6 4 7 4 8 6 3 4 8 7 4 4 6 4 10 6 5 5 7 6 9 9 1 1 4 8 4 11 6 5 4 2 3 8 7 8 8 3 4 8 5

Readme

Source
raw.​githubusercontent.​com

sublimetext-cuda-cpp

CUDA C++ package for Sublime Text 2 & 3

Syntax Highlighting

Currently supports highlighting of all CUDA C/C++ syntax defined in Appendices B and C of the NVIDIA CUDA C Programming Guide (CUDA Toolkit v6.0).

Snippets

  • Execution Configuration: <<< + [TAB] –> <<<gridDim, blockDim, sharedBytes, streamId>>>() with tab stops on each of the arguments.
  • __syncthreads(): __s + [TAB]
  • cudaMalloc: cmal –> cudaMalloc((void**)&variable, bytes);
  • cudaMallocManaged: cmalmng –> cudaMallocManaged((void**)&variable, bytes);
  • cudaMemcpy: cmem –> cudaMemcpy(dest, src, bytes, cudaMemcpyHostToDevice);
  • Kernel function prototype: kernel –> __global__ void kernel() with tab stops on the function name and inside the parentheses.
  • All existing snippets from the C++ package included with Sublime Text 2/3

Installation

Easy

Install via Package Control

Hard

  • At a git-enabled command prompt, cd to Sublime Text 2 packages directory:
    • OS X: ~/Library/Application Support/Sublime Text 2/Packages/User
    • Windows: %APPDATA%\Sublime Text 2\Packages\User
    • Linux: ~/.config/sublime-text-2/Packages/User
  • Install by cloning the repository to your Sublime Text 2 Packages directory:

    git clone git://github.com/harrism/sublimetext-cuda-cpp.git

Restart Sublime Text afterwards, switch to CUDA C++ as highlighting profile and try it out with one of the commands above.

Contributing

If you want to contribute to this package, please make syntax changes in the cuda-c++.JSON-tmLanguage file, NOT in the cuda-c++.tmLanguage file. I use the AAAPackageDev package for Sublime text to make development easier, including converting JSON to plist (XML) format.