Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I compile Open CL on Mac OS X 10.6.3?

I was able to follow instructions and compiled CUDA 3.0 but cannot compile OpenCL that goes with it on Mac OS X 10.6.3?

like image 620
Roman Kagan Avatar asked Apr 28 '10 00:04

Roman Kagan


People also ask

Does Apple use OpenCL?

OpenGL is deprecated for new development, and Apple's docs no longer even acknowledge the existence of OpenCL. However, many legacy MacOS apps contain modules written in those languages, and they have been building with Xcode and running on Intel Macs just fine.

Can Mac compile C?

Various compilers are available in Mac to compile C code. Mac C compilers compile C code into an executable. This executable can be run directly to run the C code. Clang and GCC(GNU Compiler Collection) are the common compilers that are used to compile C code.


1 Answers

I beleive nVidia under OpenCL suggests you just use the Apple drivers it provides by default. To compile an OpenCL program through gcc on OS X you simply use:

gcc -o foo foo.c -framework OpenCL
like image 147
Jonathan Lisic Avatar answered Sep 22 '22 19:09

Jonathan Lisic