rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
operation_arity.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/platform/dynamic_shared_object.h>
6
7#include <cstddef>
8
9namespace rexlib
10{
11
16{
17public:
23
32 std::size_t output_count,
33 std::size_t input_count
34 ) noexcept;
35
39
42
50
58
59 friend bool operator==(
62 ) noexcept
63 {
64 return
65 lhs.get_output_count() == rhs.get_output_count() &&
66 lhs.get_input_count() == rhs.get_input_count();
67 }
68
69 friend bool operator!=(
70 const operation_arity &lhs,
71 const operation_arity &rhs
72 ) noexcept
73 {
74 return !(lhs == rhs);
75 }
76
77private:
78 std::size_t m_output_count;
79 std::size_t m_input_count;
80};
81
82} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
Describes the operand count of an operation.
Definition operation_arity.hpp:16
operation_arity() noexcept
Construct an arity with no outputs and no inputs.
std::size_t get_input_count() const noexcept
Get the number of input operands.
std::size_t get_output_count() const noexcept
Get the number of output operands.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10