![]() This will create 2 files, mykernel.cl.h and mykernel.cl.c (and mykernel.cl.c does all the magic of loading your kernel into the app). ![]() To get you started, do a: /System/Library/Frameworks/amework/Libraries/openclc -x cl -cl-std=CL1.1 -cl-auto-vectorize-enable -emit-gcl mykernel.cl I'm taking the OpenCL Hello World example from Apple here using default compiler flags (see ) and showing the steps Xcode would do in the background. With a recent Xcode (and Lion or higher), you don't even need to call clCreateProgramWithSource, just write your kernel and call it from your app, there are some additional compiling steps needed though. Thanks in advance for any suggestion that you may have. On the side is there any application that is able to validate kernel code before running it in the OCL application? ![]() I have purchased 3 books on OCL (Gaster's Heterogeneous computing with OpenCL, Scarpino's OpenCL in action and Munshi's OpenCL programming guide), and neither mention how to set up Xcode, while they go in detail for the visual studio setup and even for the eclipse setup. Is there anyone aware of a tutorial that shows how to work with OCL and Xcode? Now, I am pretty sure that others are using Xcode to run OCL code, but I cannot find any single page (except the aforementioned ) that gives a clear setup about how to run an Xcode project with OCL. I've also tried the sample project from, but they are quite ancient, and the test project in the 3rd lesson is not running at all. The AD site does not have a project to download, so I have no clue about the cause of the failure (it may be me most likely, or the site assume steps and does not mention them). cl kernel file, pasting what is on the Apple developer site, and I am not able to get anything to build, even after adding a target. ![]() I've started Xcode and created an empty project created a main.c and a. Maybe it is just me, but I had no luck building the code that is mentioned on the "hello world OCL" section. I am looking at the official documentation on the Apple site, and I see that there is a quickstart about how to use OpenCL on Xcode. ![]()
0 Comments
Leave a Reply. |