On Saturday, 18 January 2014 at 19:34:49 UTC, ponce wrote:
You can write everything in OpenCL and dispatch to both a CPU or GPU device, managing the submit queues yourself.

I guess my question is whether people are interested in std.gpgpu (or some more sane name).

What would be the purpose? To be on top of both CUDA and OpenCL?

Compiler support with futures could be useful, e.g. write D futures and let the compiler generate CUDA and OpenCL, while having a fall-back branch for the CPU in case the GPU is
unavailable/slow.

e.g.:

GPUStore store;
store[123]=somearray;
store[53]=someotherarray;

FutureCalcX futurecalcx = new....(store)...

futurecalcx.compute(store(123),store(53),1.34,299)
...
if(futurecalc.ready){
   y = futurecalc.result
}

or future with callback…

futurecalcx.thenCall(somecallback)
futurecalcx.compute(....)

Reply via email to