From 5320726836bca80f51017db18c1144d41c4e5ecb Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Wed, 19 Feb 2014 16:59:00 +1000 Subject: [PATCH] Added cudaMallocManaged snippet --- README.md | 7 ++++--- cudaMallocManaged.sublime-snippet | 9 +++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 cudaMallocManaged.sublime-snippet diff --git a/README.md b/README.md index cf83d6a..2b78e73 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ sublimetext-cuda-cpp ==================== -CUDA C++ package for Sublime Text 2 +CUDA C++ package for Sublime Text 2 & 3 Syntax Highlighting ------------------- -Currently supports highlighting of all CUDA C/C++ syntax defined in Appendices [B][1] and [C][2] of the NVIDIA CUDA C Programming Guide. +Currently supports highlighting of all CUDA C/C++ syntax defined in Appendices [B][1] and [C][2] of the NVIDIA CUDA C Programming Guide (CUDA Toolkit v6.0). Snippets -------- @@ -14,9 +14,10 @@ Snippets - Execution Configuration: `<<< + [TAB]` --> `<<>>()` 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 + - All existing snippets from the C++ package included with Sublime Text 2/3 Installation ------------ diff --git a/cudaMallocManaged.sublime-snippet b/cudaMallocManaged.sublime-snippet new file mode 100644 index 0000000..80acf98 --- /dev/null +++ b/cudaMallocManaged.sublime-snippet @@ -0,0 +1,9 @@ + + + + cmalmng + + source.cuda-c++ +