28.07.2013 Views

Making OpenCL? Simple with Haskell - AMD Developer Central

Making OpenCL? Simple with Haskell - AMD Developer Central

Making OpenCL? Simple with Haskell - AMD Developer Central

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HELLO WORLD OPENCL C SOURCE<br />

__constant char hw[] = "Hello World\n";<br />

__kernel void hello(__global char * out) {<br />

size_t tid = get_global_id(0);<br />

out[tid] = hw[tid];<br />

}<br />

• This is a separate source file (or string)<br />

• Cannot directly access host data<br />

• Compiled at runtime<br />

7 | <strong>Making</strong> <strong>OpenCL</strong> <strong>Simple</strong> | January, 2011 | Public

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!