rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
typed_program_cache_key.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "program_cache_key.hpp"
6
7#include <memory>
8#include <type_traits>
9
10namespace rexlib
11{
12
20template <typename K>
22 : public program_cache_key
23{
24public:
25 explicit typed_program_cache_key(K key);
26 ~typed_program_cache_key() override = default;
27
28 std::size_t hash() const noexcept override;
29 bool equals(
30 const program_cache_key &other
31 ) const noexcept override;
32
33 const K& get_key() const noexcept;
34
35private:
36 K m_key;
37};
38
39} // namespace rexlib
40
41#include "typed_program_cache_key.inl"
Abstract base for keys stored in an program_cache.
Definition program_cache_key.hpp:16
Default key wrapper for value types that model std::hash and equality comparison.
Definition typed_program_cache_key.hpp:23
bool equals(const program_cache_key &other) const noexcept override
Equality against another key.
std::size_t hash() const noexcept override
Hash of the wrapped key.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10