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.

THE ROAD TO SINGLE SOURCE<br />

Embedded <strong>OpenCL</strong> C concrete syntax into <strong>Haskell</strong> <strong>with</strong> quasiquation<br />

Set of default qausiquoters:<br />

– [$cl| … |] <strong>OpenCL</strong> defult device, command queue and so on<br />

– [$clCPU| … |] <strong>OpenCL</strong> CPU device, command queue, and so on<br />

– [$clALL| … |] all <strong>OpenCL</strong> devices, <strong>with</strong> N command queues, and so on<br />

– and on and on … (it would be nice to automatically compute these)<br />

Statically check <strong>OpenCL</strong> C source<br />

Antiquoting can be used to reference <strong>Haskell</strong> values<br />

Save <strong>OpenCL</strong> binaries for reloading at runtime (guarantees correctness)<br />

42 | <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!