23 #ifndef STORAGE_ALIGNMENT_H
24 #define STORAGE_ALIGNMENT_H
27 #include "storage/Utils/Topology.h"
28 #include "storage/Utils/Region.h"
29 #include "storage/Utils/Exception.h"
30 #include "storage/Utils/Swig.h"
55 ALIGN_START_AND_END = 0,
56 ALIGN_END ST_DEPRECATED = 0,
61 ALIGN_START_KEEP_END = 1,
62 KEEP_END ST_DEPRECATED = 1,
67 ALIGN_START_KEEP_SIZE = 2,
68 KEEP_SIZE ST_DEPRECATED = 2,
119 unsigned long grain()
const;
126 const Impl& get_impl()
const;
130 const std::unique_ptr<Impl> impl;
A start/length pair with a block size.
Definition: Region.h:74
A class to represent hardware alignment information.
Definition: Topology.h:39
@ ALIGN_START_AND_END
Align start and end.
The storage namespace.
Definition: Actiongraph.h:39
Region align(const Region ®ion, AlignPolicy align_policy=AlignPolicy::ALIGN_START_AND_END) const
Aligns a region.
AlignPolicy
Definition: Alignment.h:51
bool can_be_aligned(const Region ®ion, AlignPolicy align_policy) const
Checks whether a region can be aligned.
AlignType
Definition: Alignment.h:37
A class to calculate partition alignment based on hardware topology.
Definition: Alignment.h:92
Base class for storage exceptions.
Definition: Exception.h:114
Definition: Alignment.h:78
@ REQUIRED
Only align to hard requirements.