-
Notifications
You must be signed in to change notification settings - Fork 13
/
cuda-c++.JSON-tmLanguage
137 lines (137 loc) · 5.16 KB
/
cuda-c++.JSON-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
{
"fileTypes": [
"cu",
"cuh",
"h"
],
"firstLineMatch": "-\\*- C\\+\\+ -\\*-",
"foldingStartMarker": "(?x)\n\t\t /\\*\\*(?!\\*)\n\t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\t",
"foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
"keyEquivalent": "^~C",
"name": "CUDA C++",
"scopeName": "source.cuda-c++",
"patterns": [
{
"include": "source.c++"
},
{
"comment": "B.1 FUNCTION TYPE QUALIFIERS",
"match": "\\b__(global|device|host|noinline|forceinline)__\\b",
"name": "keyword.function.qualifier.cuda-c++"
},
{
"comment": "B.2 VARIABLE TYPE QUALIFIERS",
"match": "\\b__(device|constant|managed|shared|restrict)__\\b",
"name": "storage.modifier.cuda-c++"
},
{
"comment": "B.3 BUILT-IN VECTOR TYPES",
"match": "\\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",
"name": "support.type.cuda-c++"
},
{
"comment": "B.4 BUILT-IN VARIABLES",
"match": "\\b(gridDim|blockIdx|blockDim|threadIdx|warpSize)\\b",
"name": "variable.language.cuda-c++"
},
{
"comment": "B.5 MEMORY FENCE FUNCTIONS",
"match": "\\b__(threadfence_system|threadfence_block|threadfence)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.6 SYNCHRONIZATION FUNCTIONS",
"match": "\\b__(syncthreads_count|syncthreads_and|syncthreads_or|syncthreads)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.8 TEXTURE FUNCTIONS",
"match": "\\b(texCubemapLayered|tex1Dlayered|tex2Dlayered|tex2Dgather|tex1Dfetch|texCubemap|tex1D|tex2D|tex3D)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.9 SURFACE FUNCTIONS",
"match": "\\b(surfCubemapLayeredwrite|surfCubemapLayeredread|surf1DLayeredwrite|surf2DLayeredwrite|surf1DLayeredread|surf2DLayeredread|surfCubemapwrite|surfCubemapread|surf1Dwrite|surf2Dwrite|surf3Dwrite|surf1Dread|surf2Dread|surf3Dread)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.10 READ-ONLY DATA CACHE LOAD FUNCTION",
"match": "\\b__ldg\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.11 TIME FUNCTION",
"match": "\\b(clock|clock64)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.12 ATOMIC FUNCTIONS",
"match": "\\b(atomicExch|atomicAdd|atomicSub|atomicMin|atomicMax|atomicInc|atomicDec|atomicCAS|atomicAnd|atomicXor|atomicOr)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.13 WARP VOTE FUNCTIONS",
"match": "\\b__(ballot|all|any)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.14 WARP SHUFFLE FUNCTIONS",
"match": "\\b__(shfl_down|shfl_xor|shfl_up|shfl)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.15 PROFILER COUNTER FUNCTION",
"match": "\\b__(prof_trigger)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.16 ASSERTION",
"match": "\\bassert\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.17 FORMATTED OUTPUT",
"match": "\\printf\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.18 DYNAMIC GLOBAL MEMORY ALLOCATION AND OPERATIONS",
"match": "\\b(malloc|free|memcpy|memset)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "B.19 EXECUTION CONFIGURATION",
"begin": "(<<<)",
"end": "(>>>)",
"name": "keyword.operator.cuda-c++",
"patterns": [
{
"include": "$base"
}
]
},
{
"comment": "B.20 LAUNCH BOUNDS",
"match": "\\b__launch_bounds__\\b",
"name": "support.function.qualifier.cuda-c++"
},
{
"comment": "D.2 INTRINSIC FUNCTIONS Table 8",
"match": "\\b__(fdividef|sincosf|log10f|exp10f|log2f|logf|expf|powf|sinf|cosf|tanf)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "D.2 INTRINSIC FUNCTIONS Table 9",
"match": "\\b__((fsqrt|frcp|fadd|fsub|fmul|fmaf|fdiv)_(rn|rz|ru|rd)|frsqrt_rn)\\b",
"name": "support.function.cuda-c++"
},
{
"comment": "D.2 INTRINSIC FUNCTIONS Table 10",
"match": "\\b__(dsqrt|dadd|dsub|dmul|ddiv|drcp|fma)_(rn|rz|ru|rd)\\b",
"name": "support.function.cuda-c++"
}
],
"repository": {
},
"uuid": "e498cb33-bf6f-487b-8c77-02576bcb76dc"
}