]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/sysinfo.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / src / engine / sysinfo.h
1 /* Copyright 2019 Rene Rivera
2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 */
5
6 #ifndef B2_SYSINFO_H
7 #define B2_SYSINFO_H
8
9 # include "config.h"
10
11 namespace b2
12 {
13 /*
14 Provides information about the system, hardware and software, we are
15 running in.
16 */
17 class system_info
18 {
19 public:
20
21 system_info();
22
23 /*
24 Returns the number of physical CPU cores if available. Otherwise
25 returns 1.
26
27 Currently implemented for: OS_MACOSX.
28 */
29 unsigned int cpu_core_count();
30
31 /*
32 Returns the number of logical CPU threads is available. Otherwise
33 returns `spu_core_count()`.
34
35 Currently implemented for: OS_MACOSX.
36 */
37 unsigned int cpu_thread_count();
38
39 private:
40
41 unsigned int cpu_core_count_ = 0;
42 unsigned int cpu_thread_count_ = 0;
43 };
44 }
45
46 #endif