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"
56 ALIGN_END ST_DEPRECATED = 0,
62 KEEP_END ST_DEPRECATED = 1,
68 KEEP_SIZE ST_DEPRECATED = 2,
119 unsigned long grain()
const;
126 const Impl& get_impl()
const;
130 const std::unique_ptr<Impl> impl;
Definition: Alignment.h:78
A class to calculate partition alignment based on hardware topology.
Definition: Alignment.h:92
bool can_be_aligned(const Region ®ion, AlignPolicy align_policy) const
Checks whether a region can be aligned.
Region align(const Region ®ion, AlignPolicy align_policy=AlignPolicy::ALIGN_START_AND_END) const
Aligns a region.
Base class for storage exceptions.
Definition: Exception.h:114
A start/length pair with a block size.
Definition: Region.h:74
A class to represent hardware alignment information.
Definition: Topology.h:39
The storage namespace.
Definition: Actiongraph.h:39
AlignType
Definition: Alignment.h:37
@ REQUIRED
Only align to hard requirements.
@ OPTIMAL
Align to topology information.
AlignPolicy
Definition: Alignment.h:51
@ ALIGN_START_AND_END
Align start and end.
@ ALIGN_START_KEEP_END
Align start and keep end.
@ ALIGN_START_KEEP_SIZE
Align start and keep size.
@ KEEP_START_ALIGN_END
Keep start and align end.