Portability | non-portable (GHC extensions) |
---|---|
Stability | experimental |
Maintainer | Martin Dybdal <dybber@dybber.dk> |
OpenCL bindings for manipulating memory objects. See section 5.2 in the OpenCL specification
- mallocArray :: Storable a => Context -> [MemFlags] -> Int -> IO (MemObject a)
- allocaArray :: Storable a => Context -> [MemFlags] -> Int -> (MemObject a -> IO b) -> IO b
- free :: MemObject a -> IO ()
- peekArray :: Storable a => CommandQueue -> Int -> Int -> MemObject a -> Ptr a -> IO ()
- peekListArray :: Storable a => CommandQueue -> Int -> MemObject a -> IO [a]
- pokeArray :: Storable a => CommandQueue -> Int -> Int -> Ptr a -> MemObject a -> IO ()
- pokeListArray :: Storable a => CommandQueue -> [a] -> MemObject a -> IO ()
- newListArray :: Storable a => Context -> [a] -> IO (MemObject a)
- newListArrayLen :: Storable a => Context -> [a] -> IO (MemObject a, Int)
- withListArray :: Storable a => Context -> [a] -> (MemObject a -> IO b) -> IO b
- withListArrayLen :: Storable a => Context -> [a] -> (Int -> MemObject a -> IO b) -> IO b
- enqueueCopyBuffer :: CommandQueue -> MemObject a -> MemObject a -> ClSize -> ClSize -> ClSize -> [Event] -> IO Event
- memobjType :: MemObject a -> IO MemObjectType
- memobjFlags :: MemObject a -> IO [MemFlags]
- memobjSize :: MemObject a -> IO CSize
- memobjHostPtr :: MemObject a -> IO (Ptr ())
- memobjMapCount :: MemObject a -> IO Int
- memobjContext :: MemObject a -> IO Context
Documentation
:: Storable a | |
=> Context | |
-> [MemFlags] | A list of |
-> Int | The number of elements to allocate memory for. |
-> IO (MemObject a) | The type (and there by size) of elements is determined by the result type. |
Allocates a device memory object.
:: Storable a | |
=> Context | |
-> [MemFlags] | A list of |
-> Int | The number of elements to allocate memory for. |
-> (MemObject a -> IO b) | The function where the |
-> IO b |
Allocates a device memory object temporarily, and makes it available for the argument function.
:: Storable a | |
=> CommandQueue | The |
-> Int | The offset inside the |
-> Int | The number of elements to read. |
-> MemObject a | The |
-> Ptr a | A pointer where the elements read should be stored. |
-> IO () |
Moves the content of a memory object from device to host exposing it as C array.
:: Storable a | |
=> CommandQueue | |
-> Int | The number of elements to read. |
-> MemObject a | |
-> IO [a] |
Moves the content of a memory object from device to host exposing it as Haskell List.
:: Storable a | |
=> CommandQueue | |
-> Int | The offset inside the |
-> Int | The number of elements to write. |
-> Ptr a | A pointer where the elements should be read from |
-> MemObject a | The |
-> IO () |
Moves a host side C array to a device-side memory object
pokeListArray :: Storable a => CommandQueue -> [a] -> MemObject a -> IO ()
Moves a host side Haskell list to a device-side memory object
newListArray :: Storable a => Context -> [a] -> IO (MemObject a)
Create a memory object containing the specified list of elements.
newListArrayLen :: Storable a => Context -> [a] -> IO (MemObject a, Int)
Create a memory object containing the specified list of elements, returning the memory object together with the number of elements in the list.
enqueueCopyBuffer :: CommandQueue -> MemObject a -> MemObject a -> ClSize -> ClSize -> ClSize -> [Event] -> IO Event
memobjType :: MemObject a -> IO MemObjectType
The type of a memory object
memobjFlags :: MemObject a -> IO [MemFlags]
The flags specified when a memory object was allocated
memobjSize :: MemObject a -> IO CSize
The size of a memory object
memobjHostPtr :: MemObject a -> IO (Ptr ())
memobjMapCount :: MemObject a -> IO Int
memobjContext :: MemObject a -> IO Context
The Context
this memory object is associated with.