eholk / harlan

A language for GPU computing.
Other
1.19k stars 82 forks source link

Reduce over 2d values is awkward #125

Open eholk opened 10 years ago

eholk commented 10 years ago

Currently to do a matrix sum you have to do something like this:

(reduce + (kernel ((row matrix)) (reduce + row)))

Having to do two reduces and a kernel is sort of verbose. We should consider a better syntax, like maybe just (reduce2 + matrix). It'd be nice to have a more generic version that also generalizes to three dimensional data.