cuda.vim 2.6 KB

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