saltmine
Arbitrary computation on the GPU using WebGL.
Very experimental.
Installation
Usage
var saltmine = var multiline = var input = 123 var output = // Result (Note float precision):// [// 2.0000001899999997,// 4.0000003799999995,// 6.00000044838664// ]
var saltmine = var multiline = var a = 123var b = 123 var output = // Result (Note float precision):// [// 1.0000000949999999,// 4.0000003799999995,// 9.00000042934544// ]
Caveats
- Overhead of setup/reading pixels generally makes calculations slower than just doing it on the CPU.
TODO
- Support more datatypes. Everything is float now. Vectors and matrices possibly better candidates for parallel speedup.
Credit
Massive thanks to the talented @hughsk for pairing with me on this. Saved me from many wrong turns.
License
MIT