robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqvim-patch:922d991: runtime(cuda): Fix typo in cuda syntax file (#40810)ee51e7bd11

master
2.3 KiB53 linesraw
1" Vim syntax file
2" Language:	CUDA (NVIDIA Compute Unified Device Architecture)
3" Maintainer:	Timothy B. Terriberry <tterribe@users.sourceforge.net>
4" Last Change:	2024 Apr 04
5" Contributor:  jiangyinzuo
6
7" quit when a syntax file was already loaded
8if exists("b:current_syntax")
9  finish
10endif
11
12" Read the C++ syntax to start with
13runtime! syntax/cpp.vim
14
15" CUDA extensions.
16" Reference: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-language-extensions
17syn keyword cudaStorageClass	__device__ __global__ __host__ __managed__
18syn keyword cudaStorageClass	__constant__ __grid_constant__ __shared__
19syn keyword cudaStorageClass	__inline__ __noinline__ __forceinline__ __inline_hint__
20syn keyword cudaStorageClass	__align__ __thread__ __restrict__
21"syn keyword cudaStorageClass	__import__ __export__ __location__
22syn keyword cudaType		char1 char2 char3 char4
23syn keyword cudaType		uchar1 uchar2 uchar3 uchar4
24syn keyword cudaType		short1 short2 short3 short4
25syn keyword cudaType		ushort1 ushort2 ushort3 ushort4
26syn keyword cudaType		int1 int2 int3 int4
27syn keyword cudaType		uint1 uint2 uint3 uint4
28syn keyword cudaType		long1 long2 long3 long4
29syn keyword cudaType		ulong1 ulong2 ulong3 ulong4
30syn keyword cudaType		longlong1 longlong2 longlong3 longlong4
31syn keyword cudaType		ulonglong1 ulonglong2 ulonglong3 ulonglong4
32syn keyword cudaType		float1 float2 float3 float4
33syn keyword cudaType		double1 double2 double3 double4
34syn keyword cudaType		dim3 texture textureReference
35syn keyword cudaType		cudaError_t cudaDeviceProp cudaMemcpyKind
36syn keyword cudaType		cudaArray cudaChannelFormatKind
37syn keyword cudaType		cudaChannelFormatDesc cudaTextureAddressMode
38syn keyword cudaType		cudaTextureFilterMode cudaTextureReadMode
39syn keyword cudaVariable	gridDim blockIdx blockDim threadIdx warpSize
40syn keyword cudaConstant	__CUDA_ARCH__
41syn keyword cudaConstant	__DEVICE_EMULATION__
42" There are too many CUDA enumeration constants. We only define a subset of commonly used constants.
43" Reference: https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html
44syn keyword cudaConstant	cudaSuccess
45
46hi def link cudaStorageClass	StorageClass
47hi def link cudaType		Type
48hi def link cudaVariable	Identifier
49hi def link cudaConstant	Constant
50
51let b:current_syntax = "cuda"
52
53" vim: ts=8