-
Notifications
You must be signed in to change notification settings - Fork 13
/
cuda-c++.tmLanguage
223 lines (223 loc) · 6.51 KB
/
cuda-c++.tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>cu</string>
<string>cuh</string>
<string>h</string>
</array>
<key>firstLineMatch</key>
<string>-\*- C\+\+ -\*-</string>
<key>foldingStartMarker</key>
<string>(?x)
/\*\*(?!\*)
|^(?![^{]*?//|[^{]*?/\*(?!.*?\*/.*?\{)).*?\{\s*($|//|/\*(?!.*?\*/.*\S))
</string>
<key>foldingStopMarker</key>
<string>(?<!\*)\*\*/|^\s*\}</string>
<key>keyEquivalent</key>
<string>^~C</string>
<key>name</key>
<string>CUDA C++</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.1 FUNCTION TYPE QUALIFIERS</string>
<key>match</key>
<string>\b__(global|device|host|noinline|forceinline)__\b</string>
<key>name</key>
<string>keyword.function.qualifier.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.2 VARIABLE TYPE QUALIFIERS</string>
<key>match</key>
<string>\b__(device|constant|managed|shared|restrict)__\b</string>
<key>name</key>
<string>storage.modifier.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.3 BUILT-IN VECTOR TYPES</string>
<key>match</key>
<string>\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</string>
<key>name</key>
<string>support.type.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.4 BUILT-IN VARIABLES</string>
<key>match</key>
<string>\b(gridDim|blockIdx|blockDim|threadIdx|warpSize)\b</string>
<key>name</key>
<string>variable.language.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.5 MEMORY FENCE FUNCTIONS</string>
<key>match</key>
<string>\b__(threadfence_system|threadfence_block|threadfence)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.6 SYNCHRONIZATION FUNCTIONS</string>
<key>match</key>
<string>\b__(syncthreads_count|syncthreads_and|syncthreads_or|syncthreads)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.8 TEXTURE FUNCTIONS</string>
<key>match</key>
<string>\b(texCubemapLayered|tex1Dlayered|tex2Dlayered|tex2Dgather|tex1Dfetch|texCubemap|tex1D|tex2D|tex3D)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.9 SURFACE FUNCTIONS</string>
<key>match</key>
<string>\b(surfCubemapLayeredwrite|surfCubemapLayeredread|surf1DLayeredwrite|surf2DLayeredwrite|surf1DLayeredread|surf2DLayeredread|surfCubemapwrite|surfCubemapread|surf1Dwrite|surf2Dwrite|surf3Dwrite|surf1Dread|surf2Dread|surf3Dread)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.10 READ-ONLY DATA CACHE LOAD FUNCTION</string>
<key>match</key>
<string>\b__ldg\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.11 TIME FUNCTION</string>
<key>match</key>
<string>\b(clock|clock64)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.12 ATOMIC FUNCTIONS</string>
<key>match</key>
<string>\b(atomicExch|atomicAdd|atomicSub|atomicMin|atomicMax|atomicInc|atomicDec|atomicCAS|atomicAnd|atomicXor|atomicOr)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.13 WARP VOTE FUNCTIONS</string>
<key>match</key>
<string>\b__(ballot|all|any)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.14 WARP SHUFFLE FUNCTIONS</string>
<key>match</key>
<string>\b__(shfl_down|shfl_xor|shfl_up|shfl)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.15 PROFILER COUNTER FUNCTION</string>
<key>match</key>
<string>\b__(prof_trigger)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.16 ASSERTION</string>
<key>match</key>
<string>\bassert\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.17 FORMATTED OUTPUT</string>
<key>match</key>
<string>\bprintf\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>B.18 DYNAMIC GLOBAL MEMORY ALLOCATION AND OPERATIONS</string>
<key>match</key>
<string>\b(malloc|free|memcpy|memset)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>begin</key>
<string>(<<<)</string>
<key>comment</key>
<string>B.19 EXECUTION CONFIGURATION</string>
<key>end</key>
<string>(>>>)</string>
<key>name</key>
<string>keyword.operator.cuda-c++</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$base</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>B.20 LAUNCH BOUNDS</string>
<key>match</key>
<string>\b__launch_bounds__\b</string>
<key>name</key>
<string>support.function.qualifier.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>D.2 INTRINSIC FUNCTIONS Table 8</string>
<key>match</key>
<string>\b__(fdividef|sincosf|log10f|exp10f|log2f|logf|expf|powf|sinf|cosf|tanf)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>D.2 INTRINSIC FUNCTIONS Table 9</string>
<key>match</key>
<string>\b__((fsqrt|frcp|fadd|fsub|fmul|fmaf|fdiv)_(rn|rz|ru|rd)|frsqrt_rn)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
<dict>
<key>comment</key>
<string>D.2 INTRINSIC FUNCTIONS Table 10</string>
<key>match</key>
<string>\b__(dsqrt|dadd|dsub|dmul|ddiv|drcp|fma)_(rn|rz|ru|rd)\b</string>
<key>name</key>
<string>support.function.cuda-c++</string>
</dict>
</array>
<key>repository</key>
<dict/>
<key>scopeName</key>
<string>source.cuda-c++</string>
<key>uuid</key>
<string>e498cb33-bf6f-487b-8c77-02576bcb76dc</string>
</dict>
</plist>