You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!GetLogicalProcessorInformationEx(RelationProcessorCore, nullptr, &buffer_size)) {
122
+
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
123
+
return0;
124
+
}
125
+
}
126
+
127
+
std::vector<char> buffer(buffer_size);
128
+
if (!GetLogicalProcessorInformationEx(RelationProcessorCore, reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(buffer.data()), &buffer_size)) {
129
+
return0;
130
+
}
131
+
132
+
c_info.num_physical_cores = 0;
133
+
c_info.num_logical_cores = 0;
134
+
c_info.num_e_cores = 0;
135
+
c_info.num_p_cores = 0;
136
+
137
+
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(buffer.data());
138
+
while (buffer_size > 0) {
139
+
if (info->Relationship == RelationProcessorCore) {
140
+
c_info.num_physical_cores++;
141
+
for (int i = 0; i < info->Processor.GroupCount; ++i) {
if (!GetLogicalProcessorInformationEx(RelationProcessorCore, nullptr, &buffer_size)) {
136
-
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
137
-
return default_threads;
138
-
}
139
-
}
140
-
141
-
std::vector<char> buffer(buffer_size);
142
-
if (!GetLogicalProcessorInformationEx(RelationProcessorCore, reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(buffer.data()), &buffer_size)) {
0 commit comments