ufo-core icon indicating copy to clipboard operation
ufo-core copied to clipboard

Let task developer handle outputs

Open tfarago opened this issue 7 years ago • 0 comments

I have a reductor task where I want to allocate N output buffers which fill up almost complete GPU memory. Thus, I don't want UFO to actually create the output buffer for me, even less 2x because of the double buffering. The question is how to implement this behavior. Example pseudocode:

blah_process (...)
{
    for (int i = 0; i < priv->N; i++) {
        // execute_kernel_for_volume i
    }
}

blah_generate (..., UfoBuffer *output)
{
    if (priv->count < priv->N) {
        output = priv->volumes[priv->count++];
        return TRUE;
    } else {
        return FALSE;
    }
}

tfarago avatar Oct 23 '17 14:10 tfarago