Open3D (C++ API)  0.18.0+252c867
CPUInfo.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 #pragma once
8 
9 #include <memory>
10 
11 namespace open3d {
12 namespace utility {
13 
15 class CPUInfo {
16 public:
17  static CPUInfo& GetInstance();
18 
19  ~CPUInfo() = default;
20  CPUInfo(const CPUInfo&) = delete;
21  void operator=(const CPUInfo&) = delete;
22 
25  int NumCores() const;
26 
30  int NumThreads() const;
31 
33  void Print() const;
34 
35 private:
36  CPUInfo();
37  struct Impl;
38  std::unique_ptr<Impl> impl_;
39 };
40 
41 } // namespace utility
42 } // namespace open3d
CPU information.
Definition: CPUInfo.h:15
void operator=(const CPUInfo &)=delete
int NumCores() const
Definition: CPUInfo.cpp:126
int NumThreads() const
Definition: CPUInfo.cpp:128
CPUInfo(const CPUInfo &)=delete
static CPUInfo & GetInstance()
Definition: CPUInfo.cpp:121
void Print() const
Prints CPUInfo in the console.
Definition: CPUInfo.cpp:130
Definition: PinholeCameraIntrinsic.cpp:16
Definition: CPUInfo.cpp:32