Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ipcl/include/ipcl/utils/parse_cpuinfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ typedef struct {
static void parseCPUInfo(linuxCPUInfo& info) {
std::ifstream cpuinfo;
cpuinfo.exceptions(std::ifstream::badbit);
info.n_cores = 0;
info.n_processors = 0;
info.n_nodes = 0;

try {
cpuinfo.open("/proc/cpuinfo", std::ios::in);
Expand Down Expand Up @@ -67,7 +70,7 @@ static void parseCPUInfo(linuxCPUInfo& info) {
throw std::runtime_error(log.str());
}
}
linuxCPUInfo GetLinuxCPUInfo(void);
linuxCPUInfo getLinuxCPUInfoImpl(void);

} // namespace ipcl

Expand Down
2 changes: 1 addition & 1 deletion ipcl/include/ipcl/utils/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class OMPUtilities {
private:
#ifdef IPCL_RUNTIME_DETECT_CPU_FEATURES
static const linuxCPUInfo cpuinfo;
static const linuxCPUInfo getLinuxCPUInfo() { return GetLinuxCPUInfo(); }
static const linuxCPUInfo getLinuxCPUInfo() { return getLinuxCPUInfoImpl(); }
#endif
static const int nodes;
static const int cpus;
Expand Down
2 changes: 1 addition & 1 deletion ipcl/utils/parse_cpuinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <fstream>
#include <sstream>

ipcl::linuxCPUInfo ipcl::GetLinuxCPUInfo(void) {
ipcl::linuxCPUInfo ipcl::getLinuxCPUInfoImpl(void) {
ipcl::linuxCPUInfo info;
ipcl::parseCPUInfo(info);
return info;
Expand Down