rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
shape_rule_interpreter.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/operation/shape_rule/shape_rule_descriptor.hpp>
6
7#include <rexlib/core/operation/operand_specification.hpp>
8#include <rexlib/core/operation/operation_descriptor.hpp>
9#include <rexlib/core/platform/dynamic_shared_object.h>
10#include <rexlib/core/span.hpp>
11
12#include <cstddef>
13
14namespace rexlib
15{
16
129
130} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
Immutable static description of an operation type.
Definition operation_descriptor.hpp:30
Type erased form of an operand_shape_rule.
Definition shape_rule_descriptor.hpp:25
Interpreter of a shape rule lowered to tables.
Definition shape_rule_interpreter.hpp:38
void accept(const operation_descriptor &descriptor, span< const std::size_t > named_axes, bool keep_dimensions, span< const std::size_t > operation_extents, span< const operand_specification > user_outputs, span< const operand_specification > inputs) const
Decide whether outputs supplied in advance have admissible shapes.
void deduce(const operation_descriptor &descriptor, span< const std::size_t > named_axes, bool keep_dimensions, span< const std::size_t > operation_extents, span< operand_specification > canonical_outputs, span< const operand_specification > inputs) const
Compute the shapes of the outputs the inputs call for.
shape_rule_interpreter(const shape_rule_descriptor &rule) noexcept
Construct an interpreter of a rule.
void check_instance(const operation_descriptor &descriptor, span< const std::size_t > named_axes, span< const std::size_t > operation_extents) const
Check the values an operation instance supplies.
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.