5#include <rexlib/core/operation/shape_rule/shape_rule_interpreter.hpp>
6#include <rexlib/core/operation/type_rule/type_rule_interpreter.hpp>
8#include <rexlib/core/operation/operand_specification.hpp>
9#include <rexlib/core/operation/operation_descriptor.hpp>
10#include <rexlib/core/operation/operation_signature.hpp>
11#include <rexlib/core/span.hpp>
33template <
typename ShapeRule,
typename TypeRule,
typename Parameters>
41 ShapeRule::output_count == TypeRule::output_count &&
42 ShapeRule::input_count == TypeRule::input_count,
43 "The shape rule describes a different number of operands than the "
55 typename =
typename std::enable_if<
105#include "rule_signature.inl"
Container for multidimensional numeric data.
Definition array.hpp:31
Shape and data type of an operand.
Definition operand_specification.hpp:24
Describes the operand count of an operation.
Definition operation_arity.hpp:16
Immutable static description of an operation type.
Definition operation_descriptor.hpp:30
Interface deciding the shape and data type of the operands of an operation.
Definition operation_signature.hpp:31
Operation signature made of a shape rule and a typing rule.
Definition rule_signature.hpp:36
void deduce(const operation_descriptor &descriptor, span< operand_specification > canonical_outputs, span< const operand_specification > inputs) const override
Compute the output operands the inputs call for.
void check_parameters(const operation_descriptor &descriptor) const
Check the parameters against the rules.
operation_arity get_arity() const noexcept override
Get the number of output and input operands.
void accept(const operation_descriptor &descriptor, span< const operand_specification > user_outputs, span< const operand_specification > inputs) const override
Decide whether output operands supplied in advance are admissible.
const Parameters & get_parameters() const noexcept
Get the parameters of the operation instance.
rule_signature(Args &&... args)
Construct the signature by constructing its parameters.
Interpreter of a shape rule lowered to tables.
Definition shape_rule_interpreter.hpp:38
Represents a non-owning area of contiguous memory.
Definition span.hpp:99
Interpreter of a typing rule lowered to a descriptor.
Definition type_rule_interpreter.hpp:40
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
@ inputs
Bound by the input axes that name the variable.