saltmine
Arbitrary computation on the GPU using WebGL.
Very experimental.
Installation
Usage
var saltmine = require('saltmine')
var multiline = require('multiline')
var input = [1,2,3]
var output = saltmine(input, multiline(function(){}))
var saltmine = require('saltmine')
var multiline = require('multiline')
var a = [1,2,3]
var b = [1,2,3]
var output = saltmine(a, b, multiline(function(){}))
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