|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
CPU base class for executable programs. More...
#include <rexlib/backends/cpu/cpu_program.hpp>
Public Member Functions | |
| virtual void | execute (span< const std::shared_ptr< buffer > > outputs, span< const std::shared_ptr< const buffer > > inputs, span< const std::shared_ptr< buffer > > scratch, thread_pool &pool) const =0 |
| Immediately execute the the program. | |
Public Member Functions inherited from rexlib::program | |
| program (const program &other)=delete | |
| program (program &&other)=delete | |
| program & | operator= (const program &other)=delete |
| program & | operator= (program &&other)=delete |
| virtual span< const program_scratch_requirement > | get_scratch_requirements () const |
| Queries the scratch buffer requirements for this program. | |
CPU base class for executable programs.
|
pure virtual |
Immediately execute the the program.
The pool travels with the call rather than with the program because a program is built once and run many times, possibly against queues that do not share their threads. It is the queue running the program that knows which threads the program may use, so it says so here.
A program is free to ignore it and run on the calling thread. Whatever it does, the call returns only once the program has finished: the operands are spans the caller owns, and they stop being valid when command_queue::submit returns.
| outputs | Output buffers. Neither may be null. |
| inputs | Input buffers. Neither may be null. |
| scratch | Workspace buffers. Neither may be null. |
| pool | The threads the program may spread itself over. |