rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
arithmetic.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 <utility>
9
10namespace rexlib
11{
12
13class execution_context;
14
28REXLIB_API
33 array *out = nullptr
34);
35
54 array *out = nullptr
55);
56
69 array *out = nullptr
70);
71
87 array *out = nullptr
88);
89
108 array *out = nullptr
109);
110
129 array *out = nullptr
130);
131
153 array *out = nullptr
154);
155
180 array *out = nullptr
181);
182
198 array *out = nullptr
199);
200
223std::pair<array, array> divmod(
227 array *quotient = nullptr,
228 array *remainder = nullptr
229);
230
231} // 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 floor_divide(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Compute the element-wise floor division of two arrays.
array abs(const_array_ref x, const execution_context &context, array *out=nullptr)
Compute the element-wise absolute value of an array.
array multiply(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Compute the element-wise product of two arrays.
array subtract(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Compute the element-wise difference of two arrays.
std::pair< array, array > divmod(const_array_ref x, const_array_ref y, const execution_context &context, array *quotient=nullptr, array *remainder=nullptr)
Compute the element-wise quotient and remainder of two arrays.
array modulo(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Compute the element-wise modulo of two arrays.
array divide(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Compute the element-wise quotient of two arrays.
array sign(const_array_ref x, const execution_context &context, array *out=nullptr)
Compute the element-wise sign of an array.
array add(const_array_ref x, const_array_ref y, const execution_context &context, array *out=nullptr)
Compute the element-wise sum of two arrays.
array negate(const_array_ref x, const execution_context &context, array *out=nullptr)
Compute the element-wise negation of an array.