hopencl-0.2.0: Haskell bindings for OpenCL

Portabilitynon-portable (GHC extensions)
Stabilityexperimental
MaintainerMartin Dybdal <dybber@dybber.dk>

Foreign.OpenCL.Bindings.Context

Description

OpenCL bindings for contexts. Contexts are used by the OpenCL runtime for managing objects such as command-queues, memory, program and kernel objects. See section 4.3 in the OpenCL specification

Synopsis

Documentation

createContext

Arguments

:: [DeviceID]

Devices to include in this context

-> [ContextProperties]

Properties to set for the context

-> ContextCallback a

A callback notification function for error-reporting

-> IO Context

The newly created context

Create a new context that includes the given devices.

Information on errors that occur in the context are reported to the optional callback function. The callback function may be called asynchronously by the OpenCL implementation.

createContextFromType

Arguments

:: DeviceType

Device type that identifies the individial device(s) to include in this context

-> [ContextProperties]

Properties to set for the context

-> ContextCallback a

A callback notification function for error-reporting

-> IO Context

The newly created context

Create a new context from a device type that identifies the specific device(s) to include in the context.

Information on errors that occur in the context are reported to the optional callback function. The callback function may be called asynchronously by the OpenCL implementation.

contextDevices :: Context -> IO [DeviceID]

Obtain the devices included in the context

contextProperties :: Context -> IO [ContextProperties]

Obtain the context properties defined for a context.

data ContextCallback a where

Used to specify the callback notification function that will receive reports on errors occuring in a context.