CPU features information.
Each feature is represented by a single bit in an embedded bit array.
CpuFeatures(
const CpuFeatures& other)
noexcept = default
CpuFeatures(
const Data& other)
noexcept
bool operator==(
const CpuFeatures& other)
const noexcept bool operator!=(
const CpuFeatures& other)
const noexcept
bool empty()
const noexcept template<typename T = Data>
template<typename T = Data>
const T&
data()
const noexcept const X86&
x86()
const noexcept const ARM&
arm()
const noexcept template<typename FeatureId>
bool has(
const FeatureId& featureId)
const noexcept template<typename... Args>
bool hasAny(Args&&... args)
const noexcept
template<typename... Args>
void add(Args&&... args)
noexcept template<typename... Args>
void addIf(
bool condition, Args&&... args)
noexcept template<typename... Args>
void remove(Args&&... args)
noexcept
A word that is used to represents feature bits.
Iterator that can iterate all CPU features set.
bool CpuFeatures::empty() constnoexcept◆
Returns true if there are no features set.
template<typename T = Data>
T& CpuFeatures::data()noexcept[1/2]◆
Casts this base class into a derived type T
.
template<typename T = Data>
const T& CpuFeatures::data() constnoexcept[2/2]◆
Casts this base class into a derived type T
(const).
X86& CpuFeatures::x86()noexcept[1/2]◆
const X86& CpuFeatures::x86() constnoexcept[2/2]◆
ARM& CpuFeatures::arm()noexcept[1/2]◆
const ARM& CpuFeatures::arm() constnoexcept[2/2]◆
BitWord* CpuFeatures::bits()noexcept[1/2]◆
const BitWord* CpuFeatures::bits() constnoexcept[2/2]◆
Returns all features as array of bitwords (const).
size_t CpuFeatures::bitWordCount() constnoexcept◆
Returns the number of BitWords returned by bits().
Iterator CpuFeatures::iterator() constnoexcept◆
template<typename FeatureId>
bool CpuFeatures::has(const FeatureId& featureId) constnoexcept◆
Tests whether the feature featureId
is present.
template<typename... Args>
bool CpuFeatures::hasAny(Args&&... args) constnoexcept◆
Tests whether any of the features is present.
bool CpuFeatures::hasAll(const CpuFeatures& other) constnoexcept◆
Tests whether all features as defined by other
are present.
void CpuFeatures::reset()noexcept◆
template<typename... Args>
void CpuFeatures::add(Args&&... args)noexcept◆
Adds the given CPU featureId
to the list of features.
template<typename... Args>
void CpuFeatures::addIf(bool condition, Args&&... args)noexcept◆
Adds the given CPU featureId
to the list of features if condition
is true.
template<typename... Args>
void CpuFeatures::remove(Args&&... args)noexcept◆
Removes the given CPU featureId
from the list of features.
bool CpuFeatures::equals(const CpuFeatures& other) constnoexcept◆
Tests whether this CPU features matches other
.