Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
marzvrover authored May 16, 2020
1 parent 212f111 commit dfe9826
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Closed-form Fibonacci on GPU
Using Swift and Metal this project implements Closed-form Fibonacci on a GPU

## Requirements
This project uses [apple/swift-arguments-parser](https://github.com/apple/swift-argument-parser)

## How to use
After building in Xcode, simply run in the command line.
For one result at index use:
```bash
Closed-form\ Fibonacci\ on\ GPU <index>
```
To do a range set a start:
```bash
Closed-form\ Fibonacci\ on\ GPU --start <start_index> <index>
```
To run on the CPU instead include the CPU flag:
```bash
Closed-form\ Fibonacci\ on\ GPU --cpu --start <start_index> <index>
```

## Limitations
The CPU calculations (using the --cpu flag) are only accurate in the range (0, 70].

The GPU calculations are only accurate in the range (0, 32].

## Improvements
This project could be improved by implementing a arbitrary-precision arithmetic.
This would require a new data structure on both the Swift and MSL sides.
And it would need a way to accurately pass the data between the CPU and GPU.

0 comments on commit dfe9826

Please sign in to comment.