Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'develop'
  • Loading branch information
zhensydow committed Nov 24, 2011
2 parents b182545 + 5462295 commit ef423eb
Show file tree
Hide file tree
Showing 15 changed files with 7,980 additions and 36 deletions.
15 changes: 8 additions & 7 deletions OpenCL.cabal
@@ -1,9 +1,9 @@
Name: OpenCL
Version: 1.0.2.2
Version: 1.0.2.3
License: BSD3
License-File: LICENSE
Author: Luis Cabellos
Copyright: (c) 2011 Luis Cabellos
Copyright: (c) 2011 Luis Cabellos, at The Institute of Physics of Cantabria (IFCA)
Category: GPU, FFI, Graphics
Build-Type: Simple
Stability: Experimental
Expand All @@ -15,10 +15,10 @@ Cabal-Version: >=1.8
Tested-With: GHC
Description:
Haskell FFI binding to OpenCL library. It includes high-level wrappers to
help development. Based on OpenCLRaw package.
help development. Based on the OpenCLRaw package.
.
Most of the functions can throw a 'CLError' Exception. Using the module
'Control.Exception' helps to work with this package Exceptions.
Most of the functions can throw a 'CLError' exception. Using the module
'Control.Exception' helps to work with this package's exceptions.

Extra-source-files: README.org
examples/example01.hs
Expand Down Expand Up @@ -46,12 +46,13 @@ Library
cpp-options: "-DCALLCONV=stdcall"
else
cpp-options: "-DCALLCONV=ccall"
extra-libraries: OpenCL

cpp-options: -I include

source-repository this
type: git
location: https://zhensydow@github.com/zhensydow/opencl.git
tag: 1.0.2.2
tag: 1.0.2.3
branch: master

source-repository head
Expand Down
36 changes: 16 additions & 20 deletions README.org
@@ -1,37 +1,33 @@
* Introduction
OpenCL highlevel wrapper for Haskell.
#+STARTUP: showall
* OpenCL
A high-level OpenCL library for Haskell.

Based on Jeff Heard OpenCLRaw.
Based on the [[http://hackage.haskell.org/package/OpenCLRaw][OpenCLRaw]] package by J.R. Heard.

* Install the package
** Installation
*Requirements:* [[http://hackage.haskell.org/package/c2hs][c2hs]] must be installed. (Try ~cabal install c2hs~.)

Requisite: c2hs installed.

In order to install the package. You need the CL/cl.h include file in a knowed
path. With the usual commands to install as a user library:
With the usual commands to install as a user library:

: runhaskell Setup configure --user
: runhaskell Setup build
: runhaskell Setup install
: cabal install --user

The programs that use the library, need to link against OpenCL
Programs using the library must link against OpenCL; for example, by
passing ~-lOpenCL~ to GHC.

** Optional Requisites
Some OpenCL libraries required also numa libs. E.g, on Ubuntu 11.04:

: install libnuma1 libnuma-dev
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

** Executing on ghci
** Using ghci

It's possible to execute the command line interface of ghc linking with
OpenCL, e.g:
It's possible to use GHCi with OpenCL, e.g.:

: ghci -lOpenCL examples/example01.hs

0 comments on commit ef423eb

Please sign in to comment.