|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
CRTP base supplying the static description of an operation. More...
#include <rexlib/core/operation/basic_operation.hpp>
Public Types | |
| using | traits_type = Traits |
| using | shape_rule_type = typename Traits::shape_rule_type |
| using | type_rule_type = typename Traits::type_rule_type |
Public Member Functions | |
| const operation_descriptor & | get_descriptor () const noexcept override |
| Get the description of this operation. | |
| operation_id | get_id () const noexcept override |
Get the identifier of Derived. | |
Public Member Functions inherited from rexlib::operation | |
| operation (const operation &other)=delete | |
| operation (operation &&other)=delete | |
| operation & | operator= (const operation &other)=delete |
| operation & | operator= (operation &&other)=delete |
| virtual const operation_signature & | get_signature () const noexcept=0 |
| Get the signature deciding the shape and data type of the operands of this operation. | |
Static Public Member Functions | |
| static const operation_descriptor & | get_static_descriptor () noexcept |
| Get the description shared by every instance. | |
Static Public Attributes | |
| static REXLIB_CONST_CONSTEXPR std::size_t | output_operand_count |
| static REXLIB_CONST_CONSTEXPR std::size_t | input_operand_count |
CRTP base supplying the static description of an operation.
Implements everything an operation can state once and for all: its name, its arity and the names of its operands, all read from Traits. The signature getter is left pure, so that an operation owning its signature derives from this one and the compiler enforces that it provides it.
The operand counts are exposed as compile time constants, which is what a backend builder needs to size its operand arrays. They come from the operation's typing rule and are checked against the operand name list and the shape rule, so the arity cannot drift from any of them.
| Derived | The concrete operation type. It keeps the base class type distinct per operation, so that two operations sharing a rule do not share a base. |
| Traits | The static description. It must provide:
|
|
overridevirtualnoexcept |
Get the description of this operation.
Implements rexlib::operation.
|
overridevirtualnoexcept |
Get the identifier of Derived.
Pinned to Derived rather than to the dynamic type, so that an operation specialising another still dispatches to the builders of the operation it specialises.
Reimplemented from rexlib::operation.
|
staticnoexcept |
Get the description shared by every instance.
|
static |
|
static |