|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Describes a scratch buffer requirement for program execution. More...
#include <rexlib/core/hardware/program_scratch_requirement.hpp>
Public Member Functions | |
| program_scratch_requirement (std::size_t size, std::size_t alignment, memory_resource_affinity affinity) noexcept | |
| Constructs a scratch buffer requirement. | |
| program_scratch_requirement (const program_scratch_requirement &other)=default | |
| program_scratch_requirement (program_scratch_requirement &&other)=default | |
| program_scratch_requirement & | operator= (const program_scratch_requirement &other)=default |
| program_scratch_requirement & | operator= (program_scratch_requirement &&other)=default |
| std::size_t | get_size () const noexcept |
| Returns the required scratch buffer size in bytes. | |
| std::size_t | get_alignment () const noexcept |
| Returns the required alignment in bytes for the scratch buffer. | |
| memory_resource_affinity | get_affinity () const noexcept |
| Returns the memory affinity for the scratch buffer. | |
Describes a scratch buffer requirement for program execution.
A program may require scratch (temporary) memory buffers during execution. This class encapsulates a single scratch buffer requirement, specifying:
This is an immutable value object. Once constructed, its properties cannot be changed. Instances are typically lightweight and efficiently copied or moved.
|
noexcept |
Constructs a scratch buffer requirement.
| size | Size in bytes of the required scratch buffer. |
| alignment | Required alignment in bytes for the scratch buffer. Must be a power of two. |
| affinity | Where the memory should be allocated. |
|
noexcept |
Returns the memory affinity for the scratch buffer.
|
noexcept |
Returns the required alignment in bytes for the scratch buffer.
|
noexcept |
Returns the required scratch buffer size in bytes.