robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
812d029702
master
1" Vim syntax file 2" Language: Nvidia PTX (Parallel Thread Execution) 3" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com> 4" Latest Revision: 2024-12-05 5 6if exists ( "b:current_syntax" ) 7finish 8endif 9 10let s: cpo_save = & cpo 11set cpo & vim 12 13syntax iskeyword .,_,a-z,48-57 14 15" https://docs.nvidia.com/cuda/parallel-thread-execution/#directives 16syntax keywordptxFunction .entry .func 17syntax keywordptxDirective .branchtargets .file .loc .secion .maxnctapersm .maxnreg .minnctapersm .noreturn .pragma .reqntid .target .version .weak 18syntax keywordptxOperator .address_size .alias .align .callprototype .calltargets 19syntax keywordptxStorageClass .common .const .extern .global .local .param .reg .sreg .shared .tex .visible 20syntax keywordptxType .explicitcluster .maxclusterrank .reqnctapercluster 21 22" https://docs.nvidia.com/cuda/parallel-thread-execution/#fundamental-types 23" signed integer 24syntax keywordptxType .s8 .s16 .s32 .s64 25" unsigned integer 26syntax keywordptxType .u8 .u16 .u32 .u64 27" floating-point 28syntax keywordptxType .f16 .f16x2 .f32 .f64 29" bits (untyped) 30syntax keywordptxType .b8 .b16 .b32 .b64 .b128 31" predicate 32syntax keywordptxType .pred 33 34" https://docs.nvidia.com/cuda/parallel-thread-execution/#instruction-statements 35syntax keyword ptxStatement ret 36 37syntax region ptxCommentL start = "// "skip = "\\$ "end = "$ "keepend 38syntax region ptxComment matchgroup = ptxCommentStart start = "/\* "end = "\*/ "extend 39 40hi def link ptxFunction Function 41hi def link ptxDirective Keyword 42hi def link ptxOperator Operator 43hi def link ptxStorageClass StorageClass 44hi def link ptxType Type 45hi def link ptxStatement Statement 46 47hi def link ptxCommentL ptxComment 48hi def link ptxCommentStart ptxComment 49hi def link ptxComment Comment 50 51let & cpo = s: cpo_save 52unlet s: cpo_save