What steps are needed to get a simple OpenCL enabled program to compile and run using emacs? We’re developing with the C++ bindings right now and I have never used emacs but my teammate is very fond of it.
I just need to know how to set up the linker with ATI Stream SDK and basic OpenCL C++ bindings. The actual coding is not the problem.
OpenCL doesn’t change anything about the C/C++ project, you can use any build system you would otherwise use (vanilla Makefiles, autotools, cmake, etc).
For .cl files I have this in my .emacs:
(setq auto-mode-alist (cons '("\.cl$" . c-mode) auto-mode-alist))
…which forces Emacs to treat them as C files.
You need to
#include <CL/cl.hpp>and to pass-lOpenCLto the linker, that’s all.