rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
linalg.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/ndarray/array.hpp>
6#include <rexlib/core/ndarray/const_array_ref.hpp>
7
8#include <cstddef>
9
10namespace rexlib
11{
12
13class execution_context;
14
28REXLIB_API
33 array *out = nullptr
34);
35
58 array *out = nullptr
59);
60
84 array *out = nullptr
85);
86
108 std::ptrdiff_t axis,
110 array *out = nullptr
111);
112
127 array *out = nullptr
128);
129
148 std::ptrdiff_t axis,
150 array *out = nullptr
151);
152
167 array *out = nullptr
168);
169
170} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
Non-owning read-only reference to an array.
Definition const_array_ref.hpp:36
Pairs the hardware resources and the dispatch strategy used to run operations.
Definition execution_context.hpp:43
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.
array cross(const_array_ref x, const_array_ref y, std::ptrdiff_t axis, const execution_context &context, array *out=nullptr)
Take the cross product of two arrays along one axis.
array vecmat(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Multiply a stack of vectors by a stack of matrices.
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.
array matvec(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Multiply a stack of matrices by a stack of vectors.