ehird / opencl

Haskell high-level wrapper for OpenCL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCL

A high-level OpenCL library for Haskell.

Based on the OpenCLRaw package by J.R. Heard.

Installation

Requirements: c2hs must be installed. (Try cabal install c2hs.)

With the usual commands to install as a user library:

cabal install --user

Programs using the library must link against OpenCL; for example, by passing -lOpenCL to GHC.

Optional Requisites

Some OpenCL libraries require additional NUMA libraries. For instance, on Ubuntu 11.04:

sudo apt-get install libnuma1 libnuma-dev

Example

There is an simple working example in the examples folder. You can create an executable using:

ghc --make -lOpenCL examples/example01.hs

Using ghci

It’s possible to use GHCi with OpenCL, e.g.:

ghci -lOpenCL examples/example01.hs

About

Haskell high-level wrapper for OpenCL

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C 48.9%Language:C++ 44.5%Language:Haskell 6.6%