rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
backend_priority.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "platform/constexpr.hpp"
7
8#include <limits>
9#include <ostream>
10
11namespace rexlib
12{
13
20{
21 unsupported = std::numeric_limits<int>::min(),
22 fallback = -1024,
23 normal = 0,
24 optimal = 1024,
25};
26
27REXLIB_CONSTEXPR
28bool operator<(backend_priority lhs, backend_priority rhs) noexcept;
29REXLIB_CONSTEXPR
30bool operator<=(backend_priority lhs, backend_priority rhs) noexcept;
31REXLIB_CONSTEXPR
32bool operator>(backend_priority lhs, backend_priority rhs) noexcept;
33REXLIB_CONSTEXPR
34bool operator>=(backend_priority lhs, backend_priority rhs) noexcept;
35
36REXLIB_CONSTEXPR const char* to_string(backend_priority priority) noexcept;
37
38template<typename T>
39std::basic_ostream<T>& operator<<(
40 std::basic_ostream<T>& os,
41 backend_priority priority
42);
43
44} // namespace rexlib
45
46#include "backend_priority.inl"
Macro definitions for supported attributes.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
backend_priority
Enumeration defining the preference over the selection of a particular backend.
Definition backend_priority.hpp:20
@ fallback
Used for dummy implementations.
@ optimal
Backend specially optimized for the use case.
@ unsupported
Backend isn't supported.
@ normal
Normal priority. Use by default.