Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Haskell high-level wrapper for OpenCL
tag: 1.0.1.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
src/System/GPU
.gitignore
LICENSE
OpenCL.cabal
README.org
Setup.hs

README.org

Introduction

OpenCL highlevel wrapper for Haskell.

Based on Jeff Heard OpenCLRaw.

Install the package

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:

runhaskell Setup configure --user
runhaskell Setup build
runhaskell Setup install

The programs that use the library, need to link against OpenCL

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

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

ghci -lOpenCL examples/example01.hs

Things To Do

  • [ ] better types
  • [ ] define Image Buffer functions clCreateImage2D, clCreateImage3D, clGetSupportedImageFormats, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clGetImageInfo
  • [ ] define clCreateProgramWithBinary
  • [ ] define clEnqueueNativeKernel
  • [ ] define clGetContextProperties
  • [ ] better install proccess, configure
Something went wrong with that request. Please try again.