https://github.com/ifca-advanced-computing/opencl
Haskell high-level wrapper for OpenCL
https://github.com/ifca-advanced-computing/opencl
Last synced: 8 months ago
JSON representation
Haskell high-level wrapper for OpenCL
- Host: GitHub
- URL: https://github.com/ifca-advanced-computing/opencl
- Owner: IFCA-Advanced-Computing
- License: bsd-3-clause
- Archived: true
- Created: 2011-07-11T08:08:46.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2021-10-04T00:23:02.000Z (over 4 years ago)
- Last Synced: 2025-09-27T22:54:07.639Z (8 months ago)
- Language: Haskell
- Homepage:
- Size: 519 KB
- Stars: 70
- Watchers: 14
- Forks: 26
- Open Issues: 12
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+STARTUP: showall
* OpenCL
A high-level OpenCL library for Haskell.
Based on the [[http://hackage.haskell.org/package/OpenCLRaw][OpenCLRaw]] package by J.R. Heard.
By Luis Cabellos at [[http://www.ifca.es/en/home2][IFCA]]
** Installation
*Requirements:* [[http://hackage.haskell.org/package/c2hs][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.
*** About versioning
OpenCL module uses Package Version Policy:
http://www.haskell.org/haskellwiki/Package_versioning_policy
But It differs in the A version number. It use OpenCL API version as A
number, so 1.0.3.0 correspond to A=1.0=OpenCL API version 1.0, B=3 and
C=0. The major version number is 1.0.3
** 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 examples/example01.hs
** Using ghci
It's possible to use GHCi with OpenCL, e.g.:
: ghci examples/example01.hs