rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
subscript_tags.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "slice.hpp"
6#include "../platform/constexpr.hpp"
7
8#include <ostream>
9#include <type_traits>
10
11namespace rexlib
12{
13
22{
23 friend REXLIB_CONSTEXPR
24 bool operator==(ellipsis_tag, ellipsis_tag) noexcept
25 {
26 return true;
27 }
28
29 friend REXLIB_CONSTEXPR
30 bool operator!=(ellipsis_tag, ellipsis_tag) noexcept
31 {
32 return false;
33 }
34
35 template <typename T>
36 friend std::basic_ostream<T>&
37 operator<<(std::basic_ostream<T> &os, ellipsis_tag)
38 {
39 return os << "ellipsis_tag";
40 }
41};
42
48REXLIB_CONSTEXPR
50
58{
59 friend REXLIB_CONSTEXPR
60 bool operator==(new_axis_tag, new_axis_tag) noexcept
61 {
62 return true;
63 }
64
65 friend REXLIB_CONSTEXPR
66 bool operator!=(new_axis_tag, new_axis_tag) noexcept
67 {
68 return false;
69 }
70
71 template <typename T>
72 friend std::basic_ostream<T>&
73 operator<<(std::basic_ostream<T> &os, new_axis_tag)
74 {
75 return os << "new_axis_tag";
76 }
77};
78
84REXLIB_CONSTEXPR
86
87} // namespace rexlib
88
89#include "subscript_tags.inl"
Container for multidimensional numeric data.
Definition array.hpp:31
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
REXLIB_CONSTEXPR ellipsis_tag ellipsis() noexcept
Construct an ellipsis_tag.
REXLIB_CONSTEXPR new_axis_tag new_axis() noexcept
Construct a new_axis_tag.
Tag to express the consumption of an arbitrary amount of axes until no slack is left on the right-han...
Definition subscript_tags.hpp:22
Tag to express the creation a new axis of size one.
Definition subscript_tags.hpp:58