dcompute icon indicating copy to clipboard operation
dcompute copied to clipboard

unittest kernels

Open 9il opened this issue 9 years ago • 1 comments

We need a simple way to write GPU unittests for small projects.

9il avatar Feb 28 '17 03:02 9il

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);
}

thewilsonator avatar Feb 28 '17 07:02 thewilsonator