rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
vecdot_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/parameters/reduction_axes.hpp>
8#include <rexlib/ops/rules/shape_rules.hpp>
9#include <rexlib/ops/rules/type_rules.hpp>
10
11namespace rexlib
12{
13namespace ops
14{
15
32REXLIB_DECLARE_PARAMETRIC_OPERATION(
33 vecdot,
34 ops_component,
35 REXLIB_OPERANDS("result"),
36 REXLIB_OPERANDS("left", "right"),
38 reduction_axes,
39 binary_homogeneous_rule<arithmetic_type_domain>
40);
41
42} // namespace ops
43} // namespace rexlib
operand_shape_rule< type_list< extent_from_inputs<> >, type_list< core_dimensions<> >, type_list< core_dimensions< axis_same_as< 0 > >, core_dimensions< axis_same_as< 0 > > >, named_core< axes_of, keep_dimensions_of > > vector_dot_shape_rule
Dot product of two stacks of vectors along the axis the operation names.
Definition shape_rules.hpp:153
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
array vecdot(const_array_ref x, const_array_ref y, std::ptrdiff_t axis, const execution_context &context, array *out=nullptr)
Contract two arrays along one axis, broadcasting the rest.