vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

hip.vim (2200B)


      1 " Vim syntax file
      2 " Language:	HIP (Heterogeneous-compute Interface for Portability)
      3 " Maintainer:	Young <young20050727@gmail.com>
      4 " Last Change:	2026 Jul 15
      5 " Based On:	syntax/cuda.vim by Timothy B. Terriberry
      6 
      7 " quit when a syntax file was already loaded
      8 if exists("b:current_syntax")
      9   finish
     10 endif
     11 
     12 " Read the C++ syntax to start with
     13 runtime! syntax/cpp.vim
     14 
     15 " HIP extensions.
     16 " Reference: https://docs.amd.com/en/latest/develop-perf-tips/hip-programming-guide/
     17 syn keyword hipStorageClass	__device__ __global__ __host__ __managed__
     18 syn keyword hipStorageClass	__constant__ __grid_constant__ __shared__
     19 syn keyword hipStorageClass	__inline__ __noinline__ __forceinline__ __inline_hint__
     20 syn keyword hipStorageClass	__align__ __thread__ __restrict__
     21 syn keyword hipType		char1 char2 char3 char4
     22 syn keyword hipType		uchar1 uchar2 uchar3 uchar4
     23 syn keyword hipType		short1 short2 short3 short4
     24 syn keyword hipType		ushort1 ushort2 ushort3 ushort4
     25 syn keyword hipType		int1 int2 int3 int4
     26 syn keyword hipType		uint1 uint2 uint3 uint4
     27 syn keyword hipType		long1 long2 long3 long4
     28 syn keyword hipType		ulong1 ulong2 ulong3 ulong4
     29 syn keyword hipType		longlong1 longlong2 longlong3 longlong4
     30 syn keyword hipType		ulonglong1 ulonglong2 ulonglong3 ulonglong4
     31 syn keyword hipType		float1 float2 float3 float4
     32 syn keyword hipType		double1 double2 double3 double4
     33 syn keyword hipType		dim3 texture textureReference
     34 syn keyword hipType		hipError_t hipDeviceProp hipMemcpyKind
     35 syn keyword hipType		hipArray hipChannelFormatKind
     36 syn keyword hipType		hipChannelFormatDesc hipTextureAddressMode
     37 syn keyword hipType		hipTextureFilterMode hipTextureReadMode
     38 syn keyword hipVariable		gridDim blockIdx blockDim threadIdx warpSize
     39 syn keyword hipConstant		__HIP_ARCH__
     40 syn keyword hipConstant		__DEVICE_EMULATION__
     41 " There are too many HIP enumeration constants. We only define a subset of commonly used constants.
     42 " Reference: https://docs.amd.com/en/latest/develop-perf-tips/hip-programming-guide/
     43 syn keyword hipConstant		hipSuccess
     44 
     45 hi def link hipStorageClass	StorageClass
     46 hi def link hipType		Type
     47 hi def link hipVariable		Identifier
     48 hi def link hipConstant		Constant
     49 
     50 let b:current_syntax = "hip"
     51 
     52 " vim: ts=8