ufo-core
ufo-core copied to clipboard
Let task developer handle outputs
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;
}
}