Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/acowley/CLUtil

Thin abstraction layer over the Haskell OpenCL library.
https://github.com/acowley/CLUtil

Last synced: 2 months ago
JSON representation

Thin abstraction layer over the Haskell OpenCL library.

Awesome Lists containing this project

README

        

A thin abstraction layer over the [OpenCL
package](http://hackage.haskell.org/package/OpenCL) that facilitates
the use of OpenCL with Vectors.

Example usage:

```haskell
import CLUtil
import qualified Data.Vector.Storable as V

test1 = do s <- ezInit CL_DEVICE_TYPE_CPU
k <- kernelFromFile s "VecEZ.cl" "vecAdd"
runCL s $
do let v1 = V.fromList [1,2,3,4::Float]
v2 = V.fromList [5,6,7,8::Float]
v3 <- runKernel k v1 v2 (Out 4) (Work1D 1)
liftIO $ print (v3::Vector Float)
```