BSD-3-Clause licensed by The Accelerate Team
Maintained by Trevor L. McDonell
This version can be pinned in stack with:accelerate-examples-1.1.0.0@sha256:75bf8f2d3cfee1f9d79f06ec50b22ad151c69482837c14f09f724b9b080f4633,23305

Module documentation for 1.1.0.0

  • Data
    • Data.Array
      • Data.Array.Accelerate
        • Data.Array.Accelerate.Examples
          • Data.Array.Accelerate.Examples.Internal

Examples programs using Accelerate

Build Status Hackage Docker Automated build Docker status

Example programs using the Accelerate library. If you add new features to the base library or find a bug, please add a test case. The aim is for this program to evolve and be useful for both performance and regression testing.

If you have found a bug, please report it to: https://github.com/AccelerateHS/accelerate/issues

Installation

External dependencies

Installation of accelerate-examples and its dependencies requires several external packages. You may need to adjust the package names or versions slightly for your system.

  • Ubuntu/Debian (apt-get):

    • llvm-4.0-dev
    • freeglut3-dev
    • libfftw3-dev
  • Mac OS (homebrew)

    • fftw
    • libffi
    • llvm-hs/homebrew-llvm/llvm-4.0

If you want to use the CUDA GPU enabled backend accelerate-llvm-ptx, you will also need to install the CUDA toolkit for your system. You can find an installer on NVIDIA’s website here:

stack

For development, the recommend build method is via the stack tool. This will simplify pulling in dependencies not yet on Hackage. For example, to build using ghc-8.0:

ln -s stack-8.0.yaml stack.yaml     # only once
stack build                         # or, 'stack install' to install the executables globally

Before building, you may want to edit the stack.yaml file to change the build configuration. In particular, the flags section at the bottom can be used to enable or disable individual example programs and accelerate backends, as well as features such as monitoring and debug output.

Adding new backends

Adding support for new Accelerate backends should require only a few minor additions to the cabal file and the module ‘Data.Array.Accelerate.Examples.Internal.Backend’.