rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
fixed_width_float.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <limits>
6#include <cstdint>
7#include <type_traits>
8
9#include "../platform/attributes.hpp"
10#include "../platform/dynamic_shared_object.h"
11
12namespace rexlib
13{
14
22{
23public:
24 float16_t() noexcept;
25 float16_t(float value) noexcept;
26 float16_t(const float16_t &other) = default;
27 float16_t(float16_t &&other) = default;
28 ~float16_t() = default;
29
30 float16_t& operator=(const float16_t &other) = default;
31 float16_t& operator=(float16_t &&other) = default;
32
33 operator float() const noexcept;
34
40 std::uint16_t get_bits() const noexcept;
41
43 std::uint16_t m_bits;
44};
46
52
58
69struct is_floating_point : std::integral_constant<
70 bool,
71 std::is_floating_point<T>::value || std::is_same<T, float16_t>::value
72> {};
73
74} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
array()
Construct an uninitialized array.
16 bit floating point number representation.
Definition fixed_width_float.hpp:22
std::uint16_t get_bits() const noexcept
Obtain the underlying bit pattern.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
Determine if a type is a floating point type.
Definition fixed_width_float.hpp:72