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_axes.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "axis_list.hpp"
6
7#include <rexlib/core/platform/dynamic_shared_object.h>
8#include <rexlib/core/span.hpp>
9
10#include <cstddef>
11
12namespace rexlib
13{
14namespace ops
15{
16
25{
26public:
37 bool keep_dimensions = false
38 ) noexcept;
39
47
56
58 axis_list m_axes;
59 bool m_keep_dimensions;
60};
61
62} // namespace ops
63} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
The axes a reduction acts along, and whether its result keeps them with an extent of one.
Definition reduction_axes.hpp:25
bool get_keep_dimensions() const noexcept
Check whether the result keeps the reduced axes.
reduction_axes(axis_list axes, bool keep_dimensions=false) noexcept
Construct the parameters of a reduction.
span< const std::size_t > get_axes() const noexcept
Get the axes reduced.
Represents a non-owning area of contiguous memory.
Definition span.hpp:99
std::vector< std::size_t > axis_list
The axes an operation acts along.
Definition axis_list.hpp:19
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10