19#ifndef MS_PROCESSORS_HPP
20#define MS_PROCESSORS_HPP
25namespace msparser_internal {
26 class ms_processors_impl;
29namespace matrix_science {
65 HT_SUPPORTED_NOT_ENABLED = 3,
80 DEPRECATED_MAX_CORES_PER_LICENSE = 4
100 int getNumOnSystem()
const;
103 int getNumAvailableToProcess()
const;
106 bool isProcessAffinitySupported()
const;
109 bool isUseProcessesNotThreads()
const;
112 UINT64 getWhichAvailableForMascot()
const;
115 std::vector<int> getWhichAvailableForMascot2()
const;
118 bool isLogicalCPUAvailableForMascot(
const int cpu)
const;
121 int getNumProcessorGroups()
const;
124 int getNumPhysicalOnSystem()
const;
127 HYPERTHREADING getHyperThreadingState()
const;
130 int getNumLogicalPerPhysical(
const int packageID = 0)
const;
133 int getNumCores(
const int packageID = -1)
const;
136 int getPhysicalFromLogical(
const int cpu)
const;
139 std::string getProcessorName()
const;
142 std::string getMultithreadedName()
const;
145 UINT64 getHyperThreadedCPUsMask()
const;
148 bool isPrimaryLogicalProcessor(
const int cpu)
const;
151 bool isThreadedLogicalProcessor(
const int cpu)
const;
154 int getCoreFromLogical(
const int cpu)
const;
157 int getHT_IDFromLogical(
const int cpu)
const;
160 int getAutoDetectNumThreads(
const int numLicensed,
const int numCoresPerCpuLicense)
const;
163 bool setProcessAffinity(
const std::vector<unsigned int> & vecCpu)
const;
166 bool setProcessAffinity(
const std::vector<int> & vecCpu)
const;
169 bool setThreadAffinity(
const int logicalCpu)
const;
172 msparser_internal::ms_processors_impl * pImpl_;
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
This class is designed to retrieve current CPU configuration on the computer and set affinity.
Definition: ms_processors.hpp:50
HYPERTHREADING
Hyper-threading status for the CPUs.
Definition: ms_processors.hpp:61