2 " Language: CUDA (NVIDIA Compute Unified Device Architecture)
3 " Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net>
4 " Last Change: 2007 Oct 13
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
14 " Read the C syntax to start with
16 source <sfile>:p:h/c.vim
22 syn keyword cudaStorageClass __device__ __global__ __host__
23 syn keyword cudaStorageClass __constant__ __shared__
24 syn keyword cudaStorageClass __inline__ __align__ __thread__
25 "syn keyword cudaStorageClass __import__ __export__ __location__
26 syn keyword cudaStructure template
27 syn keyword cudaType char1 char2 char3 char4
28 syn keyword cudaType uchar1 uchar2 uchar3 uchar4
29 syn keyword cudaType short1 short2 short3 short4
30 syn keyword cudaType ushort1 ushort2 ushort3 ushort4
31 syn keyword cudaType int1 int2 int3 int4
32 syn keyword cudaType uint1 uint2 uint3 uint4
33 syn keyword cudaType long1 long2 long3 long4
34 syn keyword cudaType ulong1 ulong2 ulong3 ulong4
35 syn keyword cudaType float1 float2 float3 float4
36 syn keyword cudaType ufloat1 ufloat2 ufloat3 ufloat4
37 syn keyword cudaType dim3 texture textureReference
38 syn keyword cudaType cudaError_t cudaDeviceProp cudaMemcpyKind
39 syn keyword cudaType cudaArray cudaChannelFormatKind
40 syn keyword cudaType cudaChannelFormatDesc cudaTextureAddressMode
41 syn keyword cudaType cudaTextureFilterMode cudaTextureReadMode
42 syn keyword cudaVariable gridDim blockIdx blockDim threadIdx
43 syn keyword cudaConstant __DEVICE_EMULATION__
44 syn keyword cudaConstant cudaSuccess
45 " Many more errors are defined, but only these are listed in the maunal
46 syn keyword cudaConstant cudaErrorMemoryAllocation
47 syn keyword cudaConstant cudaErrorInvalidDevicePointer
48 syn keyword cudaConstant cudaErrorInvalidSymbol
49 syn keyword cudaConstant cudaErrorMixedDeviceExecution
50 syn keyword cudaConstant cudaMemcpyHostToHost
51 syn keyword cudaConstant cudaMemcpyHostToDevice
52 syn keyword cudaConstant cudaMemcpyDeviceToHost
53 syn keyword cudaConstant cudaMemcpyDeviceToDevice
54 syn keyword cudaConstant cudaReadModeElementType
55 syn keyword cudaConstant cudaReadModeNormalizedFloat
56 syn keyword cudaConstant cudaFilterModePoint
57 syn keyword cudaConstant cudaFilterModeLinear
58 syn keyword cudaConstant cudaAddressModeClamp
59 syn keyword cudaConstant cudaAddressModeWrap
60 syn keyword cudaConstant cudaChannelFormatKindSigned
61 syn keyword cudaConstant cudaChannelFormatKindUnsigned
62 syn keyword cudaConstant cudaChannelFormatKindFloat
64 hi def link cudaStorageClass StorageClass
65 hi def link cudaStructure Structure
66 hi def link cudaType Type
67 hi def link cudaVariable Identifier
68 hi def link cudaConstant Constant
70 let b:current_syntax = "cuda"