@hackage accelerate-llvm-native1.0.0.0
Accelerate backend generating LLVM
Categories
License
BSD-3-Clause
Maintainer
Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
Links
Versions
Installation
Dependencies (12)
- accelerate >=1.0 && <1.1
- accelerate-llvm >=1.0 && <1.1
- base >=4.7 && <4.10
- containers >=0.5 && <0.6
- directory >=1.0
- dlist >=0.6 Show all…
Dependents (8)
@hackage/accelerate-bignum, @hackage/containers-accelerate, @hackage/accelerate-fourier, @hackage/accelerate-fft, @hackage/accelerate-kullback-liebler, @hackage/numhask-array, Show all…
Package Flags
debug
(off by default)
Enable debug tracing message flags. Note that debug must be enabled in the
base accelerate package as well. See the accelerate package for usage
and available options.
bounds-checks
(on by default)
Enable bounds checking
unsafe-checks
(off by default)
Enable bounds checking in unsafe operations
internal-checks
(off by default)
Enable internal consistency checks
This library implements a backend for the Accelerate language which generates LLVM-IR targeting multicore CPUs. For further information, refer to the main accelerate package.
- Dependencies
Haskell dependencies are available from Hackage. The following external libraries are alse required:
- Installing LLVM
Homebrew
Example using Homebrew on macOS:
brew install llvm-hs/homebrew-llvm/llvm-4.0
Debian & Ubuntu
For Debian/Ubuntu based Linux distributions, the LLVM.org website provides binary distribution packages. Check apt.llvm.org for instructions for adding the correct package database for your OS version, and then:
apt-get install llvm-4.0-dev
Building from source
If your OS does not have an appropriate LLVM distribution available, you can
also build from source. Detailed build instructions are available on
LLVM.org. Make sure to
include the cmake build options
-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON so that the libLLVM
shared library will be built.
- Installing accelerate-llvm
To use accelerate-llvm it is important that the llvm-hs package is
installed against the libLLVM shared library, rather than statically
linked, so that we can use LLVM from GHCi and Template Haskell. This is the
default configuration, but you can also enforce this explicitly by adding
the following to your stack.yaml file:
flags:
llvm-hs:
shared-llvm: trueOr by specifying the shared-llvm flag to cabal:
cabal install llvm-hs -fshared-llvm