rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
program_scratch_requirement.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "memory_resource_affinity.hpp"
6
7#include <rexlib/core/platform/dynamic_shared_object.h>
8
9#include <cstddef>
10
11namespace rexlib
12{
13
28{
29public:
42 std::size_t size,
43 std::size_t alignment,
45 ) noexcept;
46
49 ) = default;
52
54 operator=(const program_scratch_requirement &other) = default;
56 operator=(program_scratch_requirement &&other) = default;
57
63 std::size_t get_size() const noexcept;
64
70 std::size_t get_alignment() const noexcept;
71
78 memory_resource_affinity get_affinity() const noexcept;
79
80private:
81 std::size_t m_size;
82 std::size_t m_alignment;
83 memory_resource_affinity m_affinity;
84};
85
86} // namespace rexlib
Describes a scratch buffer requirement for program execution.
Definition program_scratch_requirement.hpp:28
program_scratch_requirement(std::size_t size, std::size_t alignment, memory_resource_affinity affinity) noexcept
Constructs a scratch buffer requirement.
std::size_t get_size() const noexcept
Returns the required scratch buffer size in bytes.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
memory_resource_affinity
Enumeration to query memory_resource according to its intended usage.
Definition memory_resource_affinity.hpp:12