Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbudde/aplacc
APL to Accelerate compiler through a typed IL
https://github.com/mbudde/aplacc
Last synced: 7 days ago
JSON representation
APL to Accelerate compiler through a typed IL
- Host: GitHub
- URL: https://github.com/mbudde/aplacc
- Owner: mbudde
- Created: 2014-09-15T10:01:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-11T19:26:28.000Z (almost 9 years ago)
- Last Synced: 2023-04-13T20:09:50.220Z (over 1 year ago)
- Language: Haskell
- Homepage:
- Size: 203 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# APLAcc
*APL to Accelerate compiler*
## Installation
Clone and run the following command in the toplevel directory:
```shell
$ cabal install
```## Development installation
```shell
$ cabal install --only-dependencies
$ cabal configure
$ cabal build
$ export PATH=$PATH:$PWD/dist/build/aplacc/aplacc
```## Usage
```
Usage: aplacc [options]-v, --verbose verbose output
-t, --tail input file is a TAIL program
-c, --cuda use CUDA backend
--run run Accelerate program
```To compile and run a TAIL program:
```shell
$ aplacc --tail program.tail > program.hs
$ ghc -threaded program.hs
$ ./program
```To compile and run an APL program:
```shell
$ aplacc program.apl > program.hs
$ ghc -threaded program.hs
$ ./program
```
This requires that the [`aplt`](http://github.com/melsmann/apltail) compiler is available, either on your `PATH` or that the `APLT` environment variable contains the path to the compiler.
You can optionally use the environment variable `APLT_PRELUDE` to specify an APL file containing prelude function definitions.With the `--run` flag, the Accelerate program is run with the `runghc` program instead of being printed.
```shell
$ aplacc --run program.apl
```
For this to work APLAcc must be installed with cabal or the environment variable `APLACC_HOME` must point to the directory containing `aplacc.cabal`.## Testing
The repository contains a number of test programs. The test programs can be run using the `test.sh` script:
```shell
$ ./test.sh tests/working # Run all programs in the directory
$ ./test.sh tests/working/life.tail -v # Run specific program verbosely
```