Making OpenCL? Simple with Haskell - AMD Developer Central

Making OpenCL? Simple with Haskell - AMD Developer Central Making OpenCL? Simple with Haskell - AMD Developer Central

developer.amd.com
from developer.amd.com More from this publisher
28.07.2013 Views

MOVE TO AN IMPLICIT MODEL 36 | Making OpenCL Simple | January, 2011 | Public CPU Context GPU Programs Kernels Memory Objects Command Queues • Context is an environment • CommandQueue is shared for read/write device memory and executing kernels, easily stored implicitly with an environment In In Order Queue Compute GPU Device Out Out of of Order Queue

CONTEXTUAL/QUEUED MONADS Function like reader monads for OpenCL Context and CommandQueue objects, avoiding having to pass Contexts and/or CommandQueues as the first parameter to many OpenCL operations. Introducing new classes gets around the dependency on the MonadReader class that would prevent asserting both MonadReader Context m and MonadReader CommandQueue m for the same type m. 37 | Making OpenCL Simple | January, 2011 | Public

CONTEXTUAL/QUEUED MONADS<br />

Function like reader monads for <strong>OpenCL</strong> Context and<br />

CommandQueue objects, avoiding having to pass Contexts<br />

and/or CommandQueues as the first parameter to many<br />

<strong>OpenCL</strong> operations.<br />

Introducing new classes gets around the dependency on the<br />

MonadReader class that would prevent asserting both<br />

MonadReader Context m and MonadReader<br />

CommandQueue m for the same type m.<br />

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