News for hackers. Stuff that matters.
Re:Lift – Lisp Flavoured Tensor by gnarbarian on Sunday September 04, 2016 @04:37PM (#12426586)
Can I write code in futhark which shares memory with objects being rendered in OpenGL? In other words, can it operate directly on objects being rendered?

I'd like to be able to write physics simulations that are visualized in 3d without having to copy the points in and out of futharks memory (killing the performance)

Re:Lift – Lisp Flavoured Tensor by Athas on Sunday September 04, 2016 @04:41PM (#12426611)
Not yet. But you can already write code that shares memory with objects that you also access from hand-written OpenCL code, and since OpenCL can interop with OpenGL, what you are asking for should eventually be possible.
Re:Lift – Lisp Flavoured Tensor by gnarbarian on Sunday September 04, 2016 @05:17PM (#12426762)
ahh yes. I have done something like that before with pyopencl but it was not pretty:

https://www.youtube.com/watch?v=lnOmy1ly6M0&list=PLCN-Ml6vUJ...

Re:Lift – Lisp Flavoured Tensor by Athas on Sunday September 04, 2016 @05:26PM (#12426790)
I have exactly that example here: https://github.com/HIPERFIT/futhark-benchmarks/tree/master/a...

All simulation and rendering is done in Futhark, with Python+Pygame for gluing things together. All the particle information stays on the GPU at all times. The only thing being copied back to the CPU is the rendered bitmap, which is then immediately moved back with a Pygame blit operation...