Vim-opencl is a vim plugin that enables syntax highlighting and syntax checker for OpenCL (Open Computing Language) files (*.cl).
I recommend to use Pathogen (www.vim.org/scripts/script.php?script_id=2332) to organize Vim plugins. In this case you should do following:
cd ~/.vim/bundle git clone git://github.com/petRUShka/vim-opencl.git
To enable syntax checker functionality you should install following:
-
Vim-plugin syntastic: github.com/scrooloose/syntastic
-
Clcc complier: clcc.sourceforge.net/
Currently, this plugin features support for beignet, pocl, NVIDIA proprietary and AMD proprietary.
Some systems may have multiple computing platforms available. In that case, you can define ‘g:syntastic_opencl_clcc_args` like this:
let g:syntastic_opencl_clcc_args = "-p 1"
where ‘p` is the platform index. You can get the platform index from running `clcc -i`.
With the same way, you might also enable warnings (only supported by some platforms) like this:
let g:syntastic_opencl_clcc_args = "-W"
Originally, this was fork of www.vim.org/scripts/script.php?script_id=3157 with some little additions. That script provides syntax highlight for OpenCL (Open Computing Language) syntax files (*.cl).
Additionally I added other part of vim plugin such as syntax checker, autodetection file-type, load C-style indent and etc…