| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/info/common/cpuinfolscpu.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "../icpuinfo.h"cxx . . $ `<file>/src/core/info/icpuinfo.h`/ |
| 7 | #include "core/idatasource.h"cxx . . $ `<file>/src/core/idatasource.h`/ |
| 8 | #include <memory> |
| 9 | #include <string> |
| 10 | #include <string_view> |
| 11 | #include <utility> |
| 12 | #include <vector> |
| 13 | |
| 14 | class CPUInfoLsCpucxx . . $ CPUInfoLsCpu# final : public ICPUInfocxx . . $ ICPUInfo#::IProvidercxx . . $ ICPUInfo#IProvider# |
| 15 | { |
| 16 | public: |
| 17 | struct Keyscxx . . $ CPUInfoLsCpu#Keys# |
| 18 | { |
| 19 | |
| 20 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# archcxx . . $ CPUInfoLsCpu#Keys#arch.{"arch"}; |
| 21 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# opModecxx . . $ std/basic_string_view#basic_string_view(837a1ee5a10cb792).{"opmode"}; |
| 22 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# byteOrdercxx . . $ std/basic_string_view#basic_string_view(837a1ee5a10cb792).{"byteorder"}; |
| 23 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# virtcxx . . $ CPUInfoLsCpu#Keys#virt.{"virt"}; |
| 24 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# l1dCachecxx . . $ CPUInfoLsCpu#Keys#l1dCache.{"l1dcache"}; |
| 25 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# l1iCachecxx . . $ CPUInfoLsCpu#Keys#l1iCache.{"l1icache"}; |
| 26 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# l2Cachecxx . . $ std/basic_string_view#basic_string_view(837a1ee5a10cb792).{"l2cache"}; |
| 27 | }; |
| 28 | |
| 29 | CPUInfoLsCpucxx . . $ CPUInfoLsCpu#CPUInfoLsCpu(2fc9eef85304919b).(stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IDataSourcecxx . . $ IDataSource#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#>>> |
| 30 | &&dataSource) noexcept; |
| 31 | |
| 32 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#>> provideInfocxx . . $ CPUInfoLsCpu#provideInfo(ba0be1eb8c175b81).( |
| 33 | int physicalId, |
| 34 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<ICPUInfocxx . . $ ICPUInfo#::ExecutionUnitcxx . . $ ICPUInfo#ExecutionUnit#> const &executionUnits) override; |
| 35 | |
| 36 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> provideCapabilitiescxx . . $ CPUInfoLsCpu#provideCapabilities(61866227792b2a60).( |
| 37 | int physicalId, |
| 38 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<ICPUInfocxx . . $ ICPUInfo#::ExecutionUnitcxx . . $ ICPUInfo#ExecutionUnit#> const &executionUnits) override; |
| 39 | |
| 40 | private: |
| 41 | stdcxx . . $ std/::stringcxx . . $ std/string# extractLineDatacxx . . $ CPUInfoLsCpu#extractLineData(ed3976f106e8bf8e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &line) const; |
| 42 | void addInfocxx . . $ CPUInfoLsCpu#addInfo(7e21eaf7eea8b08d).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# target, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key, |
| 43 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#>> &info, |
| 44 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> const &data) const; |
| 45 | |
| 46 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IDataSourcecxx . . $ IDataSource#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#>>> const dataSource_cxx . . $ CPUInfoLsCpu#dataSource_.; |
| 47 | static bool registered_cxx . . $ CPUInfoLsCpu#registered_.; |
| 48 | }; |