mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add tests for SSE3 capability
This commit is contained in:
@@ -21,12 +21,6 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
const SystemStats::CPUFlags& SystemStats::getCPUFlags()
|
||||
{
|
||||
static CPUFlags cpuFlags;
|
||||
return cpuFlags;
|
||||
}
|
||||
|
||||
String SystemStats::getBeastVersion()
|
||||
{
|
||||
// Some basic tests, to keep an eye on things and make sure these types work ok
|
||||
@@ -62,6 +56,34 @@ String SystemStats::getBeastVersion()
|
||||
static BeastVersionPrinter beastVersionPrinter;
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
struct CPUInformation
|
||||
{
|
||||
CPUInformation() noexcept
|
||||
: numCpus (0), hasMMX (false), hasSSE (false),
|
||||
hasSSE2 (false), hasSSE3 (false), has3DNow (false)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
void initialise() noexcept;
|
||||
|
||||
int numCpus;
|
||||
bool hasMMX, hasSSE, hasSSE2, hasSSE3, has3DNow;
|
||||
};
|
||||
|
||||
static const CPUInformation& getCPUInformation() noexcept
|
||||
{
|
||||
static CPUInformation info;
|
||||
return info;
|
||||
}
|
||||
|
||||
int SystemStats::getNumCpus() noexcept { return getCPUInformation().numCpus; }
|
||||
bool SystemStats::hasMMX() noexcept { return getCPUInformation().hasMMX; }
|
||||
bool SystemStats::hasSSE() noexcept { return getCPUInformation().hasSSE; }
|
||||
bool SystemStats::hasSSE2() noexcept { return getCPUInformation().hasSSE2; }
|
||||
bool SystemStats::hasSSE3() noexcept { return getCPUInformation().hasSSE3; }
|
||||
bool SystemStats::has3DNow() noexcept { return getCPUInformation().has3DNow; }
|
||||
|
||||
//==============================================================================
|
||||
String SystemStats::getStackBacktrace()
|
||||
|
||||
Reference in New Issue
Block a user