xref: /vim-8.2.3635/runtime/syntax/cuda.vim (revision 01a6c216)
1" Vim syntax file
2" Language:	CUDA (NVIDIA Compute Unified Device Architecture)
3" Maintainer:	Timothy B. Terriberry <[email protected]>
4" Last Change:	2018 Feb 06
5
6" quit when a syntax file was already loaded
7if exists("b:current_syntax")
8  finish
9endif
10
11" Read the C++ syntax to start with
12runtime! syntax/cpp.vim
13
14" CUDA extentions
15syn keyword cudaStorageClass	__device__ __global__ __host__
16syn keyword cudaStorageClass	__constant__ __shared__
17syn keyword cudaStorageClass	__inline__ __align__ __thread__
18"syn keyword cudaStorageClass	__import__ __export__ __location__
19syn keyword cudaStructure	template
20syn keyword cudaType		char1 char2 char3 char4
21syn keyword cudaType		uchar1 uchar2 uchar3 uchar4
22syn keyword cudaType		short1 short2 short3 short4
23syn keyword cudaType		ushort1 ushort2 ushort3 ushort4
24syn keyword cudaType		int1 int2 int3 int4
25syn keyword cudaType		uint1 uint2 uint3 uint4
26syn keyword cudaType		long1 long2 long3 long4
27syn keyword cudaType		ulong1 ulong2 ulong3 ulong4
28syn keyword cudaType		float1 float2 float3 float4
29syn keyword cudaType		ufloat1 ufloat2 ufloat3 ufloat4
30syn keyword cudaType		dim3 texture textureReference
31syn keyword cudaType		cudaError_t cudaDeviceProp cudaMemcpyKind
32syn keyword cudaType		cudaArray cudaChannelFormatKind
33syn keyword cudaType		cudaChannelFormatDesc cudaTextureAddressMode
34syn keyword cudaType		cudaTextureFilterMode cudaTextureReadMode
35syn keyword cudaVariable	gridDim blockIdx blockDim threadIdx
36syn keyword cudaConstant	__DEVICE_EMULATION__
37syn keyword cudaConstant	cudaSuccess
38" Many more errors are defined, but only these are listed in the maunal
39syn keyword cudaConstant	cudaErrorMemoryAllocation
40syn keyword cudaConstant	cudaErrorInvalidDevicePointer
41syn keyword cudaConstant	cudaErrorInvalidSymbol
42syn keyword cudaConstant	cudaErrorMixedDeviceExecution
43syn keyword cudaConstant	cudaMemcpyHostToHost
44syn keyword cudaConstant	cudaMemcpyHostToDevice
45syn keyword cudaConstant	cudaMemcpyDeviceToHost
46syn keyword cudaConstant	cudaMemcpyDeviceToDevice
47syn keyword cudaConstant	cudaReadModeElementType
48syn keyword cudaConstant	cudaReadModeNormalizedFloat
49syn keyword cudaConstant	cudaFilterModePoint
50syn keyword cudaConstant	cudaFilterModeLinear
51syn keyword cudaConstant	cudaAddressModeClamp
52syn keyword cudaConstant	cudaAddressModeWrap
53syn keyword cudaConstant	cudaChannelFormatKindSigned
54syn keyword cudaConstant	cudaChannelFormatKindUnsigned
55syn keyword cudaConstant	cudaChannelFormatKindFloat
56
57hi def link cudaStorageClass	StorageClass
58hi def link cudaStructure	Structure
59hi def link cudaType		Type
60hi def link cudaVariable	Identifier
61hi def link cudaConstant	Constant
62
63let b:current_syntax = "cuda"
64
65" vim: ts=8
66