Is a CUDA language definition available?
-
As the subject asks, is a CUDA language definition available? I tried looking at the user-defined language list but that server is not responding for me.
The language is quite simple. It is just C/C++ with about half a dozen keywords added. Plus there is an added construct for kernel invocation with triple angled brackets : <<< threads, blocks >>>, and that’s it.
It could probably be made easily by starting from the C++ definitions. I would do it myself if I could find that.
Does anyone know anything about this?
-
That old list was out of date, and was recently removed from the hosting site. The UDL docs page is being updated to remove that link (and provide other useful info).
Regarding your additions, just Settings > Style Configurator > C++ > INSTRUCTION WORD and add the keywords to the user-defined keywords. For the angle brackets, you’ll either have to treat them as INSTRUCTION WORD or TYPE WORD, or use something like the
EnhanceAnyBuiltinLexer.py
that @Ekopalypse shares: EnhanceAnyBuiltinLexer -
Thank you for your advice. I managed to determine where that data was saved and put the stuff in there. I think the user-defined options would be a better place for it, as you suggested, but its working OK now so I am not going to move it.