|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Abstract representation of a factory class for operation programs. More...
#include <rexlib/core/dispatch/program_builder.hpp>
Public Member Functions | |
| program_builder (const program_builder &other)=delete | |
| program_builder (program_builder &&other)=delete | |
| program_builder & | operator= (const program_builder &other)=delete |
| program_builder & | operator= (program_builder &&other)=delete |
| virtual operation_id | get_operation_id () const noexcept=0 |
| Get the operation identifier for which this builder is specialized. | |
| virtual backend_priority | get_suitability (const operation &operation, span< const operand_descriptor > output_descriptors, span< const operand_descriptor > input_descriptors, command_queue &queue) const =0 |
| Get the suitability of this builder for a given launch configuration. | |
| virtual std::shared_ptr< program > | build (const operation &operation, span< const operand_descriptor > output_descriptors, span< const operand_descriptor > input_descriptors, command_queue &queue, program_cache *cache) const =0 |
| Build an executable operation program for a given launch configuration. | |
Abstract representation of a factory class for operation programs.
|
pure virtual |
Build an executable operation program for a given launch configuration.
This method may not be called if get_suitability() returns backend_priority::unsupported.
| operation | The operation. Its ID must be equal to the ID returned by get_operation_id. |
| output_descriptors | The output operand descriptors involved in the operation. |
| input_descriptors | The input operand descriptors involved in the operation. |
| queue | The command queue where the built program is intended to be used. |
| cache | Optional cache for backend-private resources. When not null, the builder may consult and update it to reuse expensive resources (FFT plans, compiled kernels, workspaces, ...) across builds. Implementations are free to ignore it. |
|
pure virtualnoexcept |
Get the operation identifier for which this builder is specialized.
|
pure virtual |
Get the suitability of this builder for a given launch configuration.
| operation | The operation. Its ID must be equal to the ID returned by get_operation_id. |
| output_descriptors | The output operand descriptors involved in the operation. |
| input_descriptors | The input operand descriptors involved in the operation. |
| queue | The command queue where the built program is intended to be used. |
Implemented in rexlib::cpu::cpu_program_builder.