|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Immutable static description of an operation type. More...
#include <rexlib/core/operation/operation_descriptor.hpp>
Public Member Functions | |
| operation_descriptor (const char *component, const char *name, span< const char *const > output_operand_names, span< const char *const > input_operand_names) noexcept | |
| Construct a descriptor. | |
| operation_descriptor (const operation_descriptor &other)=default | |
| operation_descriptor (operation_descriptor &&other) noexcept=default | |
| operation_descriptor & | operator= (const operation_descriptor &other)=default |
| operation_descriptor & | operator= (operation_descriptor &&other) noexcept=default |
| const char * | get_component () const noexcept |
| Get the component owning the operation. | |
| const char * | get_name () const noexcept |
| Get the name of the operation. | |
| span< const char *const > | get_output_operand_names () const noexcept |
| Get the names of the output operands. | |
| span< const char *const > | get_input_operand_names () const noexcept |
| Get the names of the input operands. | |
| const char * | get_operand_name (std::size_t index, bool output_operand) const noexcept |
| Get the name of one operand. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const operation_descriptor &descriptor) |
| Write the qualified name of an operation. | |
Immutable static description of an operation type.
Holds everything that is the same for every instance of a given operation: the component it belongs to, its name, and the name of each of its operands.
Nothing here is owned. Every string and every name list must have static storage duration, which the declaration macros guarantee.
|
noexcept |
Construct a descriptor.
| component | Name of the component owning the operation, such as "rexlib.ops". Used to qualify the operation in diagnostics and to keep names from different components apart. |
| name | Name of the operation, such as "add". |
| output_operand_names | Names of the output operands, in signature order. |
| input_operand_names | Names of the input operands, in signature order. |
Get the component owning the operation.
Get the names of the input operands.
Get the name of the operation.
|
noexcept |
Get the name of one operand.
| index | Index of the operand. |
| output_operand | Whether the operand is an output. |
Get the names of the output operands.
|
friend |
Write the qualified name of an operation.
The component and the name are joined with a dot, as in "rexlib.ops.add".
| os | The stream where the descriptor is written. |
| descriptor | The descriptor to be written. |