• Joseph Noir's avatar
    Enable kernel executions with multiple stages · 522e26e3
    Joseph Noir authored
    This commit introduces memory references to memory buffers on OpenCL
    devices and thus allows passing buffers between OpenCL actors on the
    same host without the need to transfer memory between GPU and CPU
    context. For this purpose, the existing wrappers that tag arguments
    as input, output, or input as well as output now accept template
    parameters to specify whether the argument is expected and / or
    returned as a value (i.e., std::vector) or a reference.
    
    On device computations that only return references reply with a message
    containing the references directly and do not wait for the computation
    to finish. OpenCL actors that receive such references enqueue their
    kernels using OpenCL events to express the dependencies.
    
    The function that maps incoming arguments of OpenCL actors now accepts
    an optional additional argument, to allow adaption of the index space
    for the execution depending on the arguments.
    522e26e3
program.cpp 2.04 KB