asmjit::BaseFeatures Class Reference

Base class that provides information about CPU features.

Internally each feature is repreesnted by a single bit in an embedded bit-array, however, feature bits are defined by an architecture specific implementations, like x86::Features.

Public Members

Public Types

Member Functions

Construction & Destruction
Overloaded Operators
Cast
Accessors
Utilities

Member Function Documentation

template<typename T>
T& BaseFeatures::as()noexcept[1/2]

Casts this base class into a derived type T.

template<typename T>
const T& BaseFeatures::as() constnoexcept[2/2]

Casts this base class into a derived type T (const).

BitWord* BaseFeatures::bits()noexcept[1/2]

Returns all features as array of bitwords (see Support::BitWord).

const BitWord* BaseFeatures::bits() constnoexcept[2/2]

Returns all features as array of bitwords (const).

size_t BaseFeatures::bitWordCount() constnoexcept

Returns the number of BitWords returned by bits().

Iterator BaseFeatures::iterator() constnoexcept

Returns Support::BitVectorIterator, that can be used to iterate all features efficiently.

bool BaseFeatures::has(uint32_t featureId) constnoexcept

Tests whether the feature featureId is present.

bool BaseFeatures::hasAll(const BaseFeatures& other) constnoexcept

Tests whether all features as defined by other are present.

void BaseFeatures::add(uint32_t featureId)noexcept

Adds the given CPU featureId to the list of features.

void BaseFeatures::remove(uint32_t featureId)noexcept

Removes the given CPU featureId from the list of features.