├── #ifndef-#define-#endif.sublime-snippet
├── #include-(inc angle).sublime-snippet
├── #include-(inc).sublime-snippet
├── $1.begin()-$1.end()-(beginend).sublime-snippet
├── .gitignore
├── 010-main()-(main).sublime-snippet
├── 030-for-int-loop-(fori).sublime-snippet
├── Comments (C++).tmPreferences
├── Completion Rules.tmPreferences
├── Enumeration.sublime-snippet
├── Indentation Rules.tmPreferences
├── LICENSE
├── README.md
├── Symbol List - Indent Class Methods.tmPreferences
├── Symbol List - Prefix Banner Items.tmPreferences
├── Typedef.sublime-snippet
├── __syncthreads().sublime-snippet
├── class-..-(class).sublime-snippet
├── cuda-c++.JSON-tmLanguage
├── cuda-c++.sublime-build
├── cuda-c++.sublime-settings
├── cuda-c++.tmLanguage
├── cudaMalloc.sublime-snippet
├── cudaMallocManaged.sublime-snippet
├── cudaMemcpy.sublime-snippet
├── do...while-loop-(do).sublime-snippet
├── execution-configuration.sublime-snippet
├── forv.sublime-snippet
├── fprintf.sublime-snippet
├── if-..-(if).sublime-snippet
├── kernel.sublime-snippet
├── namespace-..-(namespace).sublime-snippet
├── printf-..-(printf).sublime-snippet
├── read-file-(readF).sublime-snippet
├── std-map-(map).sublime-snippet
├── std-vector-(v).sublime-snippet
├── struct.sublime-snippet
└── template-typename-..-(template).sublime-snippet
/#ifndef-#define-#endif.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | #ifndef … #define … #endif
3 |
6 | def
7 | source.c, source.c++, source.objc, source.objc++, source.cuda-c++
8 |
9 |
--------------------------------------------------------------------------------
/#include-(inc angle).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | #include <…>
3 | ]]>
4 | Inc
5 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/#include-(inc).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | #include "…"
3 |
4 | inc
5 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/$1.begin()-$1.end()-(beginend).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | $1.begin(), $1.end()
3 | )?$/(?2::(?1:>:.))/}begin(), ${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}end()]]>
4 | beginend
5 | source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Sublime text cache files
2 | .cache
--------------------------------------------------------------------------------
/010-main()-(main).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | main()
3 |
8 | main
9 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
10 |
11 |
--------------------------------------------------------------------------------
/030-for-int-loop-(fori).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | For Loop
3 |
7 | for
8 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/Comments (C++).tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Comments
7 | scope
8 | source.c, source.c++, source.objc, source.objc++, source.cuda-c++
9 | settings
10 |
11 | shellVariables
12 |
13 |
14 | name
15 | TM_COMMENT_START
16 | value
17 | //
18 |
19 |
20 | name
21 | TM_COMMENT_START_2
22 | value
23 | /*
24 |
25 |
26 | name
27 | TM_COMMENT_END_2
28 | value
29 | */
30 |
31 |
32 | name
33 | TM_COMMENT_DISABLE_INDENT_2
34 | value
35 | yes
36 |
37 |
38 |
39 | uuid
40 | 38DBCCE5-2005-410C-B7D7-013097751AC8
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Completion Rules.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | scope
6 | source.c, source.c++, source.objc, source.objc++, source.cuda-c++
7 | settings
8 |
9 | cancelCompletion
10 | ^\s*(\}?\s*(else|try|do)|(class|struct|enum|namespace)\s*[a-zA-Z_0-9]+*)$
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Enumeration.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Enumeration
3 |
4 | enum
5 | source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/Indentation Rules.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Indentation Rules
7 | scope
8 | source.c, source.c++, source.objc, source.objc++, source.cuda-c++
9 | settings
10 |
11 | decreaseIndentPattern
12 | (?x)
13 | ^ (.*\*/)? \s* \} .* $
14 | | ^ \s* (public|private|protected): \s* $
15 | | ^ \s* @(public|private|protected) \s* $
16 |
17 | increaseIndentPattern
18 | (?x)
19 | ^ .* \{ [^}"']* $
20 | | ^ \s* (public|private|protected): \s* $
21 | | ^ \s* @(public|private|protected) \s* $
22 |
23 |
24 | bracketIndentNextLinePattern
25 | (?x)
26 | ^ \s* \b(if|while|else)\b [^;]* $
27 | | ^ \s* \b(for)\b .* $
28 |
29 |
30 | unIndentedLinePattern
31 | ^\s*((/\*|.*\*/|//|#|template\b.*?>(?!\(.*\))|@protocol|@interface(?!.*\{)|@implementation|@end).*)?$
32 |
33 | indentSquareBrackets
34 |
35 |
36 |
37 | uuid
38 | 02EB44C6-9203-4F4C-BFCB-7E3360B12812
39 |
40 |
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions
5 | # are met:
6 | # * Redistributions of source code must retain the above copyright
7 | # notice, this list of conditions and the following disclaimer.
8 | # * Redistributions in binary form must reproduce the above copyright
9 | # notice, this list of conditions and the following disclaimer in the
10 | # documentation and/or other materials provided with the distribution.
11 | # * Neither the name of NVIDIA CORPORATION nor the names of its
12 | # contributors may be used to endorse or promote products derived
13 | # from this software without specific prior written permission.
14 | #
15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
16 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23 | # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | sublimetext-cuda-cpp
2 | ====================
3 |
4 | CUDA C++ package for Sublime Text 2 & 3
5 |
6 | Syntax Highlighting
7 | -------------------
8 |
9 | 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).
10 |
11 | Snippets
12 | --------
13 |
14 | - Execution Configuration: `<<< + [TAB]` --> `<<>>()` with tab stops on each of the arguments.
15 | - `__syncthreads()`: `__s + [TAB]`
16 | - cudaMalloc: `cmal` --> `cudaMalloc((void**)&variable, bytes);`
17 | - cudaMallocManaged: `cmalmng` --> `cudaMallocManaged((void**)&variable, bytes);`
18 | - cudaMemcpy: `cmem` --> `cudaMemcpy(dest, src, bytes, cudaMemcpyHostToDevice);`
19 | - Kernel function prototype: `kernel` --> `__global__ void kernel()` with tab stops on the function name and inside the parentheses.
20 | - All existing snippets from the C++ package included with Sublime Text 2/3
21 |
22 | Installation
23 | ------------
24 |
25 | ### Easy
26 |
27 | [Install via Package Control](http://wbond.net/sublime_packages/package_control)
28 |
29 | ### Hard
30 |
31 | * At a git-enabled command prompt, cd to Sublime Text 2 packages directory:
32 | * **OS X:** `~/Library/Application Support/Sublime Text 2/Packages/User`
33 | * **Windows:** `%APPDATA%\Sublime Text 2\Packages\User`
34 | * **Linux:** `~/.config/sublime-text-2/Packages/User`
35 | * Install by cloning the repository to your Sublime Text 2 Packages directory:
36 |
37 | git clone git://github.com/harrism/sublimetext-cuda-cpp.git
38 |
39 | Restart Sublime Text afterwards, switch to CUDA C++ as highlighting profile and try it out with one of the commands above.
40 |
41 | Contributing
42 | ------------
43 |
44 | 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.
45 |
46 |
47 | [1]: http://docs.nvidia.com/cuda-c-programming-guide/index.html#c-language-extensions
48 | [2]: http://docs.nvidia.com/cuda-c-programming-guide/index.html#mathematical-functions-appendix
--------------------------------------------------------------------------------
/Symbol List - Indent Class Methods.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | bundleUUID
6 | 4675A940-6227-11D9-BFB1-000D93589AF6
7 | name
8 | Symbol List: Indent Class Methods
9 | scope
10 | meta.class-struct-block.c++ entity.name.function
11 | settings
12 |
13 | symbolTransformation
14 |
15 | s/^\s*/ /; # pad
16 |
17 | uuid
18 | B2B97E23-E686-4410-991D-A92AF3A9FC95
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Symbol List - Prefix Banner Items.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Symbol List: Prefix Banner Items
7 | scope
8 | meta.toc-list.banner
9 | settings
10 |
11 | symbolTransformation
12 |
13 | s/^\s+/# /;
14 | s/^=+$/-/;
15 |
16 |
17 | uuid
18 | A8E4E48A-81F3-4DB7-A7A2-88662C06E011
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Typedef.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Typedef
3 |
4 | td
5 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/__syncthreads().sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | __s
7 |
8 | source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/class-..-(class).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Class
3 |
11 | class
12 | source.c++, source.objc++, source.cuda-c++
13 |
14 |
--------------------------------------------------------------------------------
/cuda-c++.JSON-tmLanguage:
--------------------------------------------------------------------------------
1 | {
2 | "fileTypes": [
3 | "cu",
4 | "cuh",
5 | "h"
6 | ],
7 | "firstLineMatch": "-\\*- C\\+\\+ -\\*-",
8 | "foldingStartMarker": "(?x)\n\t\t /\\*\\*(?!\\*)\n\t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\t",
9 | "foldingStopMarker": "(?>>)",
106 | "name": "keyword.operator.cuda-c++",
107 | "patterns": [
108 | {
109 | "include": "$base"
110 | }
111 | ]
112 | },
113 | {
114 | "comment": "B.20 LAUNCH BOUNDS",
115 | "match": "\\b__launch_bounds__\\b",
116 | "name": "support.function.qualifier.cuda-c++"
117 | },
118 | {
119 | "comment": "D.2 INTRINSIC FUNCTIONS Table 8",
120 | "match": "\\b__(fdividef|sincosf|log10f|exp10f|log2f|logf|expf|powf|sinf|cosf|tanf)\\b",
121 | "name": "support.function.cuda-c++"
122 | },
123 | {
124 | "comment": "D.2 INTRINSIC FUNCTIONS Table 9",
125 | "match": "\\b__((fsqrt|frcp|fadd|fsub|fmul|fmaf|fdiv)_(rn|rz|ru|rd)|frsqrt_rn)\\b",
126 | "name": "support.function.cuda-c++"
127 | },
128 | {
129 | "comment": "D.2 INTRINSIC FUNCTIONS Table 10",
130 | "match": "\\b__(dsqrt|dadd|dsub|dmul|ddiv|drcp|fma)_(rn|rz|ru|rd)\\b",
131 | "name": "support.function.cuda-c++"
132 | }
133 | ],
134 | "repository": {
135 | },
136 | "uuid": "e498cb33-bf6f-487b-8c77-02576bcb76dc"
137 | }
138 |
--------------------------------------------------------------------------------
/cuda-c++.sublime-build:
--------------------------------------------------------------------------------
1 | {
2 | "cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
3 | "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
4 | "working_dir": "${file_path}",
5 | "selector": "source.c, source.c++",
6 |
7 | "variants":
8 | [
9 | {
10 | "name": "Run",
11 | "cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/cuda-c++.sublime-settings:
--------------------------------------------------------------------------------
1 | {
2 | "extensions": [ "cu", "cuh" ]
3 | }
4 |
--------------------------------------------------------------------------------
/cuda-c++.tmLanguage:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | fileTypes
6 |
7 | cu
8 | cuh
9 | h
10 |
11 | firstLineMatch
12 | -\*- C\+\+ -\*-
13 | foldingStartMarker
14 | (?x)
15 | /\*\*(?!\*)
16 | |^(?![^{]*?//|[^{]*?/\*(?!.*?\*/.*?\{)).*?\{\s*($|//|/\*(?!.*?\*/.*\S))
17 |
18 | foldingStopMarker
19 | (?<!\*)\*\*/|^\s*\}
20 | keyEquivalent
21 | ^~C
22 | name
23 | CUDA C++
24 | patterns
25 |
26 |
27 | include
28 | source.c++
29 |
30 |
31 | comment
32 | B.1 FUNCTION TYPE QUALIFIERS
33 | match
34 | \b__(global|device|host|noinline|forceinline)__\b
35 | name
36 | keyword.function.qualifier.cuda-c++
37 |
38 |
39 | comment
40 | B.2 VARIABLE TYPE QUALIFIERS
41 | match
42 | \b__(device|constant|managed|shared|restrict)__\b
43 | name
44 | storage.modifier.cuda-c++
45 |
46 |
47 | comment
48 | B.3 BUILT-IN VECTOR TYPES
49 | match
50 | \b(dim3|char[1-4]|uchar[1-4]|short[1-4]|ushort[1-4]|int[1-4]|uint[1-4]|long[1-4]|ulong[1-4]|longlong[1-4]|ulonglong[1-4]|float[1-4]|double[1-4])\b
51 | name
52 | support.type.cuda-c++
53 |
54 |
55 | comment
56 | B.4 BUILT-IN VARIABLES
57 | match
58 | \b(gridDim|blockIdx|blockDim|threadIdx|warpSize)\b
59 | name
60 | variable.language.cuda-c++
61 |
62 |
63 | comment
64 | B.5 MEMORY FENCE FUNCTIONS
65 | match
66 | \b__(threadfence_system|threadfence_block|threadfence)\b
67 | name
68 | support.function.cuda-c++
69 |
70 |
71 | comment
72 | B.6 SYNCHRONIZATION FUNCTIONS
73 | match
74 | \b__(syncthreads_count|syncthreads_and|syncthreads_or|syncthreads)\b
75 | name
76 | support.function.cuda-c++
77 |
78 |
79 | comment
80 | B.8 TEXTURE FUNCTIONS
81 | match
82 | \b(texCubemapLayered|tex1Dlayered|tex2Dlayered|tex2Dgather|tex1Dfetch|texCubemap|tex1D|tex2D|tex3D)\b
83 | name
84 | support.function.cuda-c++
85 |
86 |
87 | comment
88 | B.9 SURFACE FUNCTIONS
89 | match
90 | \b(surfCubemapLayeredwrite|surfCubemapLayeredread|surf1DLayeredwrite|surf2DLayeredwrite|surf1DLayeredread|surf2DLayeredread|surfCubemapwrite|surfCubemapread|surf1Dwrite|surf2Dwrite|surf3Dwrite|surf1Dread|surf2Dread|surf3Dread)\b
91 | name
92 | support.function.cuda-c++
93 |
94 |
95 | comment
96 | B.10 READ-ONLY DATA CACHE LOAD FUNCTION
97 | match
98 | \b__ldg\b
99 | name
100 | support.function.cuda-c++
101 |
102 |
103 | comment
104 | B.11 TIME FUNCTION
105 | match
106 | \b(clock|clock64)\b
107 | name
108 | support.function.cuda-c++
109 |
110 |
111 | comment
112 | B.12 ATOMIC FUNCTIONS
113 | match
114 | \b(atomicExch|atomicAdd|atomicSub|atomicMin|atomicMax|atomicInc|atomicDec|atomicCAS|atomicAnd|atomicXor|atomicOr)\b
115 | name
116 | support.function.cuda-c++
117 |
118 |
119 | comment
120 | B.13 WARP VOTE FUNCTIONS
121 | match
122 | \b__(ballot|all|any)\b
123 | name
124 | support.function.cuda-c++
125 |
126 |
127 | comment
128 | B.14 WARP SHUFFLE FUNCTIONS
129 | match
130 | \b__(shfl_down|shfl_xor|shfl_up|shfl)\b
131 | name
132 | support.function.cuda-c++
133 |
134 |
135 | comment
136 | B.15 PROFILER COUNTER FUNCTION
137 | match
138 | \b__(prof_trigger)\b
139 | name
140 | support.function.cuda-c++
141 |
142 |
143 | comment
144 | B.16 ASSERTION
145 | match
146 | \bassert\b
147 | name
148 | support.function.cuda-c++
149 |
150 |
151 | comment
152 | B.17 FORMATTED OUTPUT
153 | match
154 | \bprintf\b
155 | name
156 | support.function.cuda-c++
157 |
158 |
159 | comment
160 | B.18 DYNAMIC GLOBAL MEMORY ALLOCATION AND OPERATIONS
161 | match
162 | \b(malloc|free|memcpy|memset)\b
163 | name
164 | support.function.cuda-c++
165 |
166 |
167 | begin
168 | (<<<)
169 | comment
170 | B.19 EXECUTION CONFIGURATION
171 | end
172 | (>>>)
173 | name
174 | keyword.operator.cuda-c++
175 | patterns
176 |
177 |
178 | include
179 | $base
180 |
181 |
182 |
183 |
184 | comment
185 | B.20 LAUNCH BOUNDS
186 | match
187 | \b__launch_bounds__\b
188 | name
189 | support.function.qualifier.cuda-c++
190 |
191 |
192 | comment
193 | D.2 INTRINSIC FUNCTIONS Table 8
194 | match
195 | \b__(fdividef|sincosf|log10f|exp10f|log2f|logf|expf|powf|sinf|cosf|tanf)\b
196 | name
197 | support.function.cuda-c++
198 |
199 |
200 | comment
201 | D.2 INTRINSIC FUNCTIONS Table 9
202 | match
203 | \b__((fsqrt|frcp|fadd|fsub|fmul|fmaf|fdiv)_(rn|rz|ru|rd)|frsqrt_rn)\b
204 | name
205 | support.function.cuda-c++
206 |
207 |
208 | comment
209 | D.2 INTRINSIC FUNCTIONS Table 10
210 | match
211 | \b__(dsqrt|dadd|dsub|dmul|ddiv|drcp|fma)_(rn|rz|ru|rd)\b
212 | name
213 | support.function.cuda-c++
214 |
215 |
216 | repository
217 |
218 | scopeName
219 | source.cuda-c++
220 | uuid
221 | e498cb33-bf6f-487b-8c77-02576bcb76dc
222 |
223 |
224 |
--------------------------------------------------------------------------------
/cudaMalloc.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | cmal
7 |
8 | source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/cudaMallocManaged.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | cmalmng
7 |
8 | source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/cudaMemcpy.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | cmem
7 |
8 | source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/do...while-loop-(do).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Do While Loop
3 |
7 | do
8 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/execution-configuration.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | >>(${5})
4 | ]]>
5 |
6 | <<<
7 |
8 | source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/forv.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Vector For Loop
3 | ::iterator ${3:i} = $2.begin(); $3 != $2.end(); ++$3)
4 | {
5 | $0
6 | }]]>
7 | forv
8 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/fprintf.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | fprintf …
3 |
4 | fprintf
5 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/if-..-(if).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | If Condition
3 |
7 | if
8 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/kernel.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | kernel
7 |
8 | source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/namespace-..-(namespace).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Namespace
3 |
8 | ns
9 | source.c++, source.objc++, source.cuda-c++
10 |
11 |
--------------------------------------------------------------------------------
/printf-..-(printf).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | printf …
3 |
4 | printf
5 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/read-file-(readF).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Read File Into Vector
3 | v;
4 | if (FILE${TM_C_POINTER: *}fp = fopen(${1:"filename"}, "r"))
5 | {
6 | char buf[1024];
7 | while (size_t len = fread(buf, 1, sizeof(buf), fp))
8 | v.insert(v.end(), buf, buf + len);
9 | fclose(fp);
10 | }]]>
11 | readfile
12 | source.c++, source.objc++, source.cuda-c++
13 |
14 |
--------------------------------------------------------------------------------
/std-map-(map).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | std::map
3 | map$0;]]>
4 | map
5 | source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/std-vector-(v).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | std::vector
3 | v$0;]]>
4 | vector
5 | source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------
/struct.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | Struct
3 |
7 | struct
8 | source.c, source.objc, source.c++, source.objc++, source.cuda-c++
9 |
10 |
--------------------------------------------------------------------------------
/template-typename-..-(template).sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | template <typename ${1:_InputIter}>
3 | ]]>
4 | tp
5 | source.c++, source.objc++, source.cuda-c++
6 |
7 |
--------------------------------------------------------------------------------