rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
matmul_operation.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/operation/operation_declaration_macros.hpp>
6#include <rexlib/ops/ops_component.hpp>
7#include <rexlib/ops/rules/shape_rules.hpp>
8#include <rexlib/ops/rules/type_rules.hpp>
9
10namespace rexlib
11{
12namespace ops
13{
14
25REXLIB_DECLARE_OPERATION(
26 matmul,
27 ops_component,
28 REXLIB_OPERANDS("result"),
29 REXLIB_OPERANDS("left", "right"),
31 binary_homogeneous_rule<arithmetic_type_domain>
32);
33
34} // namespace ops
35} // namespace rexlib
operand_shape_rule< type_list< extent_from_inputs<>, extent_from_inputs<>, extent_from_inputs<> >, type_list< core_dimensions< axis_same_as< 0 >, axis_same_as< 2 > > >, type_list< core_dimensions< axis_same_as< 0 >, axis_same_as< 1 > >, core_dimensions< axis_same_as< 1 >, axis_same_as< 2 > > > > matrix_multiply_shape_rule
Product of two stacks of matrices.
Definition shape_rules.hpp:253
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
array matmul(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Multiply two arrays as stacks of matrices.