This major mode for Emacs provides the following main features:
- Syntax coloring for OpenCL C kernels, including extra highlighting for address-space qualifiers and built-in functions.
- The
opencl-c-lookup
function (C-c ! d
) performs documentation look-up of the string in region or on point.
Use the following commands to install from Melpa:
M-x package-refresh-contents
M-x package-install opencl-c-mode
Alternatively, you can also install the package using e.g. use-package with the following snippet:
(use-package opencl-c-mode
:ensure t)
- Get the source code by cloning this repository:
$ git clone https://github.com/salmanebah/opencl-mode.git
- Put
opencl-c-mode.el
in your load-path or add this line to your configuration:(add-to-list 'load-path "/path/to/directory/where/opencl-c-mode.el/resides")
- Add these lines to your personal configuration file:
(require 'opencl-c-mode) (add-to-list 'auto-mode-alist '("\\.cl\\'" . opencl-c-mode))