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,
97 Alignment(
const Alignment& alignment);
98 Alignment(Alignment&& alignment) =
default;
101 Alignment& operator=(
const Alignment& alignment);
102 Alignment& operator=(Alignment&& alignment) =
default;
119 unsigned long grain()
const;
126 const Impl& get_impl()
const;
130 const std::unique_ptr<Impl> impl;
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.
Exception(LogLevel log_level=LogLevel::ERROR)
Default constructor.
A start/length pair with a block size.
Definition Region.h:85
A class to represent hardware alignment information.
Definition Topology.h:39
The storage namespace.
Definition Actiongraph.h:40
AlignType
Definition Alignment.h:37
@ OPTIMAL
Align to topology information.
Definition Alignment.h:46
@ REQUIRED
Required used features only include the minimal set of used features.
Definition UsedFeatures.h:42
AlignPolicy
Definition Alignment.h:51
@ ALIGN_START_AND_END
Align start and end.
Definition Alignment.h:55
@ ALIGN_START_KEEP_END
Align start and keep end.
Definition Alignment.h:61
@ ALIGN_START_KEEP_SIZE
Align start and keep size.
Definition Alignment.h:67
@ KEEP_START_ALIGN_END
Keep start and align end.
Definition Alignment.h:73