LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::Util::CpuFeatures Class Reference

#include "cpufeatures.h"

Public Types

enum  Feature {
  Feature::SSSE3,
  Feature::SSE41,
  Feature::AVX,
  Feature::XSave,
  Feature::AVX2,
  Feature::None
}
 

Public Member Functions

 CpuFeatures ()
 
bool HasFeature (Feature) const
 

Static Public Member Functions

static QString GetFeatureName (Feature)
 
template<typename T >
static T Choose (std::initializer_list< std::pair< Feature, T >> funcs, T fallback)
 

Detailed Description

Definition at line 19 of file cpufeatures.h.

Member Enumeration Documentation

◆ Feature

Enumerator
SSSE3 
SSE41 
AVX 
XSave 
AVX2 
None 

Definition at line 26 of file cpufeatures.h.

Constructor & Destructor Documentation

◆ CpuFeatures()

LC::Util::CpuFeatures::CpuFeatures ( )

Definition at line 32 of file cpufeatures.cpp.

Member Function Documentation

◆ Choose()

template<typename T >
static T LC::Util::CpuFeatures::Choose ( std::initializer_list< std::pair< Feature, T >>  funcs,
fallback 
)
inlinestatic

Definition at line 42 of file cpufeatures.h.

References HasFeature().

+ Here is the call graph for this function:

◆ GetFeatureName()

QString LC::Util::CpuFeatures::GetFeatureName ( Feature  feature)
static

Definition at line 57 of file cpufeatures.cpp.

◆ HasFeature()

bool LC::Util::CpuFeatures::HasFeature ( Feature  feature) const

Definition at line 78 of file cpufeatures.cpp.

Referenced by Choose().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: