ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CPUInfo.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <memory>
11 #include <string>
12 
13 #include "CVCoreLib.h"
14 
15 namespace cloudViewer {
16 namespace utility {
17 
20 public:
24  std::string model_name_;
25  };
26 
27 public:
28  static CPUInfo& GetInstance();
29 
30  ~CPUInfo() = default;
31  CPUInfo(const CPUInfo&) = delete;
32  void operator=(const CPUInfo&) = delete;
33 
36  int NumCores() const;
37 
41  int NumThreads() const;
42 
45  const std::string& ModelName() const;
46 
48  void Print() const;
49 
50 private:
51  CPUInfo();
52  std::unique_ptr<Impl> impl_;
53 };
54 
55 } // namespace utility
56 } // namespace cloudViewer
#define CV_CORE_LIB_API
Definition: CVCoreLibWin.h:15
CPU information.
Definition: CPUInfo.h:19
void operator=(const CPUInfo &)=delete
CPUInfo(const CPUInfo &)=delete
ccGuiPythonInstance * GetInstance() noexcept
Definition: Runtime.cpp:72
Generic file read and write utility for python interface.