summaryrefslogtreecommitdiff
path: root/external/vpc/tier0/cputopology.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /external/vpc/tier0/cputopology.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'external/vpc/tier0/cputopology.h')
-rw-r--r--external/vpc/tier0/cputopology.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/external/vpc/tier0/cputopology.h b/external/vpc/tier0/cputopology.h
new file mode 100644
index 0000000..5da2890
--- /dev/null
+++ b/external/vpc/tier0/cputopology.h
@@ -0,0 +1,40 @@
+//-------------------------------------------------------------------------------------
+// CpuTopology.h
+//
+// CpuToplogy class declaration.
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//-------------------------------------------------------------------------------------
+#pragma once
+#ifndef CPU_TOPOLOGY_H
+#define CPU_TOPOLOGY_H
+
+#include "winlite.h"
+
+class ICpuTopology;
+
+//---------------------------------------------------------------------------------
+// Name: CpuToplogy
+// Desc: This class constructs a supported cpu topology implementation object on
+// initialization and forwards calls to it. This is the Abstraction class
+// in the traditional Bridge Pattern.
+//---------------------------------------------------------------------------------
+class CpuTopology
+{
+public:
+ CpuTopology( BOOL bForceCpuid = FALSE );
+ ~CpuTopology();
+
+ BOOL IsDefaultImpl() const;
+ DWORD NumberOfProcessCores() const;
+ DWORD NumberOfSystemCores() const;
+ DWORD_PTR CoreAffinityMask( DWORD coreIdx ) const;
+
+ void ForceCpuid( BOOL bForce );
+private:
+ void Destroy_();
+
+ ICpuTopology* m_pImpl;
+};
+
+#endif // CPU_TOPOLOGY_H