The accelerate-examples package demonstrates a range of computational kernels and a few complete (albeit small) applications, as well as a regression test suite. To install it:
cabal install accelerate-examples -fllvm-cpu
(Optional) If you have a CUDA capable NVIDIA GPU, add the flag -fllvm-ptx
to the above command line in order to enable the accelerate-llvm-ptx
backend.
This package includes the regression test suite for Accelerate: accelerate-nofib
. In future we would also like to expand this to include benchmarks in order to track performance regressions as well. If you are experiencing problems with Accelerate, try running the test suite (it will take some time) to hopefully narrow down the problem then open a ticket on the issue tracker.
Following are a few short example programs demonstrating language features and extra libraries.
Short example programs demonstrating particular language operations or libraries.
Mandelbrot set: Generation of the classic Mandelbrot set fractal. Topics include:
generate
operatorwhile
Canny edge detector: Implementation of the Canny edge detection technique to extract edges from images. Topics include:
stencil
operatorFluid simulation: A simple, interactive, particle-based fluid simulation. Topics include:
stencil
operatorN-body simulation: N-body simulation of a group of bodies undergoing gravitational interaction. Demonstrates:
Ray-tracer: A simple real-time ray-tracer. Demonstrates: