rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
reduction.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#include <rexlib/core/span.hpp>
8
9#include <cstddef>
10
11namespace rexlib
12{
13
14class execution_context;
15
32REXLIB_API
36 bool keep_dimensions,
38 array *out = nullptr
39);
40
53 array *out = nullptr
54);
55
73 bool keep_dimensions,
75 array *out = nullptr
76);
77
90 array *out = nullptr
91);
92
113 bool keep_dimensions,
115 array *out = nullptr
116);
117
130 array *out = nullptr
131);
132
153 bool keep_dimensions,
155 array *out = nullptr
156);
157
170 array *out = nullptr
171);
172
193 bool keep_dimensions,
195 array *out = nullptr
196);
197
210 array *out = nullptr
211);
212
233 bool keep_dimensions,
235 array *out = nullptr
236);
237
250 array *out = nullptr
251);
252
272 bool keep_dimensions,
274 array *out = nullptr
275);
276
289 array *out = nullptr
290);
291
311 bool keep_dimensions,
313 array *out = nullptr
314);
315
328 array *out = nullptr
329);
330
350 bool keep_dimensions,
352 array *out = nullptr
353);
354
367 array *out = nullptr
368);
369
390 bool keep_dimensions,
392 array *out = nullptr
393);
394
407 array *out = nullptr
408);
409
410} // 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 amax(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Take the largest elements of an array along the given axes.
array sum(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Sum the elements of an array along the given axes.
array argmax(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Locate the largest elements of an array along the given axes.
array argmin(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Locate the smallest elements of an array along the given axes.
array amin(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Take the smallest elements of an array along the given axes.
array mean(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Average the elements of an array along the given axes.
REXLIB_CONSTEXPR slice all() noexcept
Construct an slice containing all positions in the axis.
array any(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Test whether any element along the given axes is true.
array product(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Multiply the elements of an array along the given axes.
array count_nonzero(const_array_ref x, span< const std::ptrdiff_t > axes, bool keep_dimensions, const execution_context &context, array *out=nullptr)
Count the non zero elements along the given axes.