OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
SystemProperties.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef _OPENMP
4#include <omp.h>
5#endif
6
8
10{
11 InstructionSet _instructionSet;
12 int _maximumNbOfThreads = 1;
13
14 void SetMaximumNbOfThreads();
16 {
17 SetMaximumNbOfThreads();
18 };
19public:
20
21 const bool CPUSupportsAVX2() const { return _instructionSet.AVX2(); };
22 const bool CPUSupportsAVX512() const { return _instructionSet.AVX512F(); };
23 const int GetMaximumNbOfThreads() const { return _maximumNbOfThreads; };
24 const int GetActiveNbOfThreads() const;
25
26
27
29 {
30 static SystemProperties INSTANCE;
31 return INSTANCE;
32 }
33};
Definition InstructionSet.h:119
bool AVX512F(void) const
Definition InstructionSet.h:160
bool AVX2(void) const
Definition InstructionSet.h:155
Definition SystemProperties.h:10
const int GetMaximumNbOfThreads() const
Definition SystemProperties.h:23
const int GetActiveNbOfThreads() const
Definition SystemProperties.cpp:14
const bool CPUSupportsAVX512() const
Definition SystemProperties.h:22
const bool CPUSupportsAVX2() const
Definition SystemProperties.h:21
static const SystemProperties & GetInstance()
Definition SystemProperties.h:28