Portability | non-portable (GHC extensions) |
---|---|
Stability | experimental |
Maintainer | Martin Dybdal <dybber@dybber.dk> |
OpenCL bindings for contexts. Context
s 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
- createContext :: [DeviceID] -> [ContextProperties] -> ContextCallback a -> IO Context
- createContextFromType :: DeviceType -> [ContextProperties] -> ContextCallback a -> IO Context
- contextDevices :: Context -> IO [DeviceID]
- contextProperties :: Context -> IO [ContextProperties]
- data ContextCallback a where
- NoContextCallback :: ContextCallback ()
- ContextCallback :: Storable a => a -> (String -> a -> IO ()) -> ContextCallback a
Documentation
:: [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.
:: 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.
NoContextCallback :: ContextCallback () | |
ContextCallback :: Storable a => a -> (String -> a -> IO ()) -> ContextCallback a |