rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
type_transform.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/numerical/numerical_type.hpp>
6#include <rexlib/core/numerical/numerical_type_domain.hpp>
7
8#include <functional>
9
10namespace rexlib
11{
12
22{
23public:
28
42 const char *relation
43 ) noexcept;
44
51 numerical_type apply(numerical_type type) const noexcept;
52
59
66
68 apply_function_type m_apply;
70 const char *m_relation;
71};
72
81
82} // namespace rexlib
83
84#include "type_transform.inl"
Container for multidimensional numeric data.
Definition array.hpp:31
Set of numerical_type-s.
Definition numerical_type_domain.hpp:32
Type erased form of a type transform.
Definition type_transform.hpp:22
numerical_type apply(numerical_type type) const noexcept
Apply the transform to a pivot type.
const numerical_type_domain & get_domain() const noexcept
Get the set of pivot types the transform is defined on.
type_transform(apply_function_type apply, const numerical_type_domain &domain, const char *relation) noexcept
Construct a type transform.
const char * get_relation() const noexcept
Get the fragment naming the mapping.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
type_transform make_type_transform() noexcept
Erase a type transform tag.
numerical_type
Representation of all considered numerical types for computations.
Definition numerical_type.hpp:19