Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

CAL IL Code Development - simple example

Very simply, I want to create CAL IL code to add a constant "a" to an array of size 5000.

How do I get CAL IL to do this?

I read through the forums that CAL IL can be generated by Brook+ Kernels.  What is the process of writing a Brook+ kernel and having it print out CAL IL that I can just copy/paste into my solution?

Any help is appreciated.


Tags (2)
1 Reply
Adept II

CAL IL Code Development - simple example

Brook+ has been obsoleted in favor of OpenCL. I strongly recommend against using it. CAL itself is going to be deprecated in the next SDK, meaning if you want to directly use IL, you'll have to put it in the binary image yourself. I haven't even tried doing this because it sounds like quite a bit of work writing ELF formatted executables.

Your best bet is to just use OpenCL. If you really want, you can view the IL it generates by playing with environment variables (I can't remember which ones) or dumping the resulting binary to disk and looking through it.