rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rexlib::cpu::cpu_program Class Referenceabstract

CPU base class for executable programs. More...

#include <rexlib/backends/cpu/cpu_program.hpp>

Inheritance diagram for rexlib::cpu::cpu_program:
rexlib::program

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.
 

Detailed Description

CPU base class for executable programs.

Member Function Documentation

◆ execute()

virtual void rexlib::cpu::cpu_program::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
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.

Parameters
outputsOutput buffers. Neither may be null.
inputsInput buffers. Neither may be null.
scratchWorkspace buffers. Neither may be null.
poolThe threads the program may spread itself over.

The documentation for this class was generated from the following file: