dcompute
dcompute copied to clipboard
unittest kernels
We need a simple way to write GPU unittests for small projects.
I think this will come naturally as we get the library to be easy to use. I suspect the best way would be to have a string to be mixed in the tests if the library has been initialised and get a default device and queue. So you'd go:
unittest
{
import dcompute.testing : ensureDcomputeInitialised; // or whatever
mixin(ensureDcomputeInitialised);
Buffer b = initialiseFromData(getData());
q.enqueue!someKernel(b, some, args);
}