| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/components/gpuprofilepart.cpp`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #include "gpuprofilepart.h"cxx . . $ `<file>/src/core/components/gpuprofilepart.h`/ |
| 5 | |
| 6 | #include "core/info/igpuinfo.h"cxx . . $ `<file>/src/core/info/igpuinfo.h`/ |
| 7 | #include "core/profilepart.h"cxx . . $ `<file>/src/core/profilepart.h`/ |
| 8 | #include "core/profilepartprovider.h"cxx . . $ `<file>/src/core/profilepartprovider.h`/ |
| 9 | #include "sensors/isensor.h"cxx . . $ `<file>/src/core/components/sensors/isensor.h`/ |
| 10 | #include <algorithm> |
| 11 | #include <iterator> |
| 12 | #include <unordered_map> |
| 13 | #include <utility> |
| 14 | |
| 15 | class GPUProfilePartcxx . . $ GPUProfilePart#::Factorycxx . . $ GPUProfilePart#Factory# final |
| 16 | : public ProfilePartcxx . . $ ProfilePart#::Factorycxx . . $ ProfilePart#Factory# |
| 17 | , public IGPUcxx . . $ IGPU#::Exportercxx . . $ IGPU#Exporter# |
| 18 | { |
| 19 | public: |
| 20 | Factorycxx . . $ GPUProfilePart#Factory#Factory(1996f9c9ad99d663).(IProfilePartProvidercxx . . $ IProfilePartProvider# const &profilePartProvider, |
| 21 | GPUProfilePartcxx . . $ GPUProfilePart# &outer) noexcept |
| 22 | : ProfilePartcxx . . $ ProfilePart#::Factorycxx . . $ ProfilePart#Factory#(profilePartProvider) |
| 23 | , outer_cxx . . $ GPUProfilePart#Factory#outer_.(outer) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | void takeProfilePartcxx . . $ GPUProfilePart#Factory#takeProfilePart(8c7717026cb6ec4).(stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> &&part) override; |
| 28 | |
| 29 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 30 | provideExportercxx . . $ GPUProfilePart#Factory#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) override; |
| 31 | |
| 32 | void takeActivecxx . . $ GPUProfilePart#Factory#takeActive(b45ddcbc8423892c).(bool) override |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | void takeInfocxx . . $ GPUProfilePart#Factory#takeInfo(d732786494c3d26b).(IGPUInfocxx . . $ IGPUInfo# const &) override; |
| 37 | void takeSensorcxx . . $ GPUProfilePart#Factory#takeSensor(73745a8c6f82d10e).(ISensorcxx . . $ ISensor# const &) override; |
| 38 | |
| 39 | private: |
| 40 | GPUProfilePartcxx . . $ GPUProfilePart# &outer_cxx . . $ GPUProfilePart#Factory#outer_.; |
| 41 | }; |
| 42 | |
| 43 | void GPUProfilePartcxx . . $ GPUProfilePart#::Factorycxx . . $ GPUProfilePart#Factory#::takeProfilePartcxx . . $ GPUProfilePart#Factory#takeProfilePart(8c7717026cb6ec4).(stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> &&part) |
| 44 | { |
| 45 | outer_cxx . . $ GPUProfilePart#Factory#outer_..parts_cxx . . $ GPUProfilePart#parts_..emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(part)); |
| 46 | } |
| 47 | |
| 48 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 49 | GPUProfilePartcxx . . $ GPUProfilePart#::Factorycxx . . $ GPUProfilePart#Factory#::provideExportercxx . . $ GPUProfilePart#Factory#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) |
| 50 | { |
| 51 | return factorycxx . . $ ProfilePart#Factory#factory(f4c9227945a043b8).(i.IDcxx . . $ Item#ID(f4fff0029955a25f).()); |
| 52 | } |
| 53 | |
| 54 | void GPUProfilePartcxx . . $ GPUProfilePart#::Factorycxx . . $ GPUProfilePart#Factory#::takeInfocxx . . $ GPUProfilePart#Factory#takeInfo(d732786494c3d26b).(IGPUInfocxx . . $ IGPUInfo# const &info) |
| 55 | { |
| 56 | // NOTE info and system component key must be initialized here |
| 57 | outer_cxx . . $ GPUProfilePart#Factory#outer_..deviceID_cxx . . $ GPUProfilePart#deviceID_. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). info.infocxx . . $ IGPUInfo#info(3654cd48a63d288).(IGPUInfocxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Keyscxx . . $ IGPUInfo#Keys#::deviceIDcxx . . $ IGPUInfo#Keys#deviceID.); |
| 58 | outer_cxx . . $ GPUProfilePart#Factory#outer_..revision_cxx . . $ GPUProfilePart#revision_. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). info.infocxx . . $ IGPUInfo#info(3654cd48a63d288).(IGPUInfocxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Keyscxx . . $ IGPUInfo#Keys#::revisioncxx . . $ IGPUInfo#Keys#revision.); |
| 59 | |
| 60 | auto uniqueID = info.infocxx . . $ IGPUInfo#info(3654cd48a63d288).(IGPUInfocxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Keyscxx . . $ IGPUInfo#Keys#::uniqueIDcxx . . $ IGPUInfo#Keys#uniqueID.); |
| 61 | if (!uniqueID.emptycxx . . $ std/__cxx11/basic_string#empty(3482b152b9333168).()) |
| 62 | outer_cxx . . $ GPUProfilePart#Factory#outer_..uniqueID_cxx . . $ GPUProfilePart#uniqueID_. =cxx . . $ std/optional#`operator=`(a631871c47728645). uniqueID; |
| 63 | |
| 64 | outer_cxx . . $ GPUProfilePart#Factory#outer_..index_cxx . . $ GPUProfilePart#index_. = info.indexcxx . . $ IGPUInfo#index(455f465bc33b4cdf).(); |
| 65 | outer_cxx . . $ GPUProfilePart#Factory#outer_..updateKeycxx . . $ GPUProfilePart#updateKey(49f6e7a06ebc5aa8).(); |
| 66 | } |
| 67 | |
| 68 | void GPUProfilePartcxx . . $ GPUProfilePart#::Factorycxx . . $ GPUProfilePart#Factory#::takeSensorcxx . . $ GPUProfilePart#Factory#takeSensor(73745a8c6f82d10e).(ISensorcxx . . $ ISensor# const &sensor) |
| 69 | { |
| 70 | auto sensorProfilePart = createPartcxx . . $ ProfilePart#Factory#createPart(eebc246fe191e829).(sensor.IDcxx . . $ Item#ID(f4fff0029955a25f).()); |
| 71 | if (sensorProfilePart != nullptr) |
| 72 | outer_cxx . . $ GPUProfilePart#Factory#outer_..parts_cxx . . $ GPUProfilePart#parts_..emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(sensorProfilePart)); |
| 73 | } |
| 74 | |
| 75 | class GPUProfilePartcxx . . $ GPUProfilePart#::Initializercxx . . $ GPUProfilePart#Initializer# final : public IGPUcxx . . $ IGPU#::Exportercxx . . $ IGPU#Exporter# |
| 76 | { |
| 77 | public: |
| 78 | Initializercxx . . $ GPUProfilePart#Initializer#Initializer(b17ba33428213716).(GPUProfilePartcxx . . $ GPUProfilePart# &outer) noexcept |
| 79 | : outer_cxx . . $ GPUProfilePart#Initializer#outer_.(outer) |
| 80 | { |
| 81 | } |
| 82 | |
| 83 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 84 | provideExportercxx . . $ GPUProfilePart#Initializer#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) override; |
| 85 | |
| 86 | void takeActivecxx . . $ GPUProfilePart#Initializer#takeActive(b45ddcbc8423892c).(bool active) override; |
| 87 | |
| 88 | void takeInfocxx . . $ GPUProfilePart#Initializer#takeInfo(d732786494c3d26b).(IGPUInfocxx . . $ IGPUInfo# const &) override |
| 89 | { |
| 90 | } |
| 91 | |
| 92 | void takeSensorcxx . . $ GPUProfilePart#Initializer#takeSensor(73745a8c6f82d10e).(ISensorcxx . . $ ISensor# const &) override |
| 93 | { |
| 94 | } |
| 95 | |
| 96 | private: |
| 97 | GPUProfilePartcxx . . $ GPUProfilePart# &outer_cxx . . $ GPUProfilePart#Initializer#outer_.; |
| 98 | stdcxx . . $ std/::unordered_mapcxx . . $ std/unordered_map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> initializers_cxx . . $ GPUProfilePart#Initializer#initializers_.; |
| 99 | }; |
| 100 | |
| 101 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 102 | GPUProfilePartcxx . . $ GPUProfilePart#::Initializercxx . . $ GPUProfilePart#Initializer#::provideExportercxx . . $ GPUProfilePart#Initializer#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) |
| 103 | { |
| 104 | for (auto &part : outer_cxx . . $ GPUProfilePart#Initializer#outer_..parts_cxx . . $ GPUProfilePart#parts_.) { |
| 105 | auto &id = part->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).IDcxx . . $ Item#ID(f4fff0029955a25f).(); |
| 106 | if (id ==cxx . . $ std/`operator==`(5ea818b58063a774). i.IDcxx . . $ Item#ID(f4fff0029955a25f).()) { |
| 107 | if (initializers_cxx . . $ GPUProfilePart#Initializer#initializers_..countcxx . . $ std/unordered_map#count(b71ff106d381144b).(id) > 0) |
| 108 | return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).initializers_cxx . . $ GPUProfilePart#Initializer#initializers_..atcxx . . $ std/unordered_map#at(4f10b6009f0ee734).(id); |
| 109 | else { |
| 110 | auto initializer = part->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).initializercxx . . $ IProfilePart#initializer(6b4e1016740e578).(); |
| 111 | if (initializer != nullptr) { |
| 112 | initializers_cxx . . $ GPUProfilePart#Initializer#initializers_..emplacecxx . . $ std/unordered_map#emplace(8e800962ae7274b6).(id, stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(initializer)); |
| 113 | return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).initializers_cxx . . $ GPUProfilePart#Initializer#initializers_..atcxx . . $ std/unordered_map#at(4f10b6009f0ee734).(id); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | break; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 122 | } |
| 123 | |
| 124 | void GPUProfilePartcxx . . $ GPUProfilePart#::Initializercxx . . $ GPUProfilePart#Initializer#::takeActivecxx . . $ GPUProfilePart#Initializer#takeActive(b45ddcbc8423892c).(bool active) |
| 125 | { |
| 126 | outer_cxx . . $ GPUProfilePart#Initializer#outer_..activatecxx . . $ ProfilePart#activate(b45ddcbc8423892c).(active); |
| 127 | } |
| 128 | |
| 129 | GPUProfilePartcxx . . $ GPUProfilePart#::GPUProfilePartcxx . . $ GPUProfilePart#GPUProfilePart(ced63f7c635d850d).() noexcept |
| 130 | : id_cxx . . $ GPUProfilePart#id_.(IGPUcxx . . $ IGPU#::ItemIDcxx . . $ IGPU#ItemID.) |
| 131 | { |
| 132 | } |
| 133 | |
| 134 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> |
| 135 | GPUProfilePartcxx . . $ GPUProfilePart#::factorycxx . . $ GPUProfilePart#factory(af48dc8d4887b70c).(IProfilePartProvidercxx . . $ IProfilePartProvider# const &profilePartProvider) |
| 136 | { |
| 137 | return stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<GPUProfilePartcxx . . $ GPUProfilePart#::Factorycxx . . $ GPUProfilePart#Factory#>(profilePartProvider, *this); |
| 138 | } |
| 139 | |
| 140 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> GPUProfilePartcxx . . $ GPUProfilePart#::initializercxx . . $ GPUProfilePart#initializer(6b4e1016740e578).() |
| 141 | { |
| 142 | return stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<GPUProfilePartcxx . . $ GPUProfilePart#::Initializercxx . . $ GPUProfilePart#Initializer#>(*this); |
| 143 | } |
| 144 | |
| 145 | stdcxx . . $ std/::stringcxx . . $ std/string# const &GPUProfilePartcxx . . $ GPUProfilePart#::IDcxx . . $ GPUProfilePart#ID(f4fff0029955a25f).() const |
| 146 | { |
| 147 | return id_cxx . . $ GPUProfilePart#id_.; |
| 148 | } |
| 149 | |
| 150 | bool GPUProfilePartcxx . . $ GPUProfilePart#::belongsTocxx . . $ GPUProfilePart#belongsTo(744b9d71fca8c8b7).(Itemcxx . . $ Item# const &i) const |
| 151 | { |
| 152 | auto gpu = dynamic_cast<IGPUcxx . . $ IGPU# const *>(&i); |
| 153 | if (gpu != nullptr) { |
| 154 | auto &info = gpu->infocxx . . $ IGPU#info(a7011a1aeb899f22).(); |
| 155 | |
| 156 | // when available, use the GPU unique ID |
| 157 | auto uniqueID = info.infocxx . . $ IGPUInfo#info(3654cd48a63d288).(IGPUInfocxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Keyscxx . . $ IGPUInfo#Keys#::uniqueIDcxx . . $ IGPUInfo#Keys#uniqueID.); |
| 158 | if (!uniqueID.emptycxx . . $ std/__cxx11/basic_string#empty(3482b152b9333168).()) |
| 159 | return uniqueID ==cxx . . $ std/`operator==`(3bdd94461e5f9e25). uniqueID_cxx . . $ GPUProfilePart#uniqueID_.; |
| 160 | |
| 161 | return info.indexcxx . . $ IGPUInfo#index(455f465bc33b4cdf).() == index_cxx . . $ GPUProfilePart#index_. && |
| 162 | info.infocxx . . $ IGPUInfo#info(3654cd48a63d288).(IGPUInfocxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Keyscxx . . $ IGPUInfo#Keys#::deviceIDcxx . . $ IGPUInfo#Keys#deviceID.) ==cxx . . $ std/`operator==`(5ea818b58063a774). deviceID_cxx . . $ GPUProfilePart#deviceID_. && |
| 163 | info.infocxx . . $ IGPUInfo#info(3654cd48a63d288).(IGPUInfocxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Keyscxx . . $ IGPUInfo#Keys#::revisioncxx . . $ IGPUInfo#Keys#revision.) ==cxx . . $ std/`operator==`(5ea818b58063a774). revision_cxx . . $ GPUProfilePart#revision_.; |
| 164 | } |
| 165 | |
| 166 | return false; |
| 167 | } |
| 168 | |
| 169 | stdcxx . . $ std/::stringcxx . . $ std/string# const &GPUProfilePartcxx . . $ GPUProfilePart#::keycxx . . $ GPUProfilePart#key(f4fff0029955a25f).() const |
| 170 | { |
| 171 | return key_cxx . . $ GPUProfilePart#key_.; |
| 172 | } |
| 173 | |
| 174 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer#>> |
| 175 | GPUProfilePartcxx . . $ GPUProfilePart#::provideImportercxx . . $ GPUProfilePart#provideImporter(c13a3bcac0db4745).(Itemcxx . . $ Item# const &i) |
| 176 | { |
| 177 | auto &id = i.IDcxx . . $ Item#ID(f4fff0029955a25f).(); |
| 178 | auto partIter = stdcxx . . $ std/::find_ifcxx . . $ std/find_if(f0a0a4f94ee5cb00).( |
| 179 | parts_cxx . . $ GPUProfilePart#parts_..cbegincxx . . $ std/vector#cbegin(d1e1699016b9d7e6).(), parts_cxx . . $ GPUProfilePart#parts_..cendcxx . . $ std/vector#cend(d1e1699016b9d7e6).(), |
| 180 | [&](auto const &part) { return part->ID() == id; }); |
| 181 | |
| 182 | if (partIter != parts_cxx . . $ GPUProfilePart#parts_..cendcxx . . $ std/vector#cend(d1e1699016b9d7e6).()) { |
| 183 | auto importer = dynamic_cast<Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# *>(partIter->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).()); |
| 184 | if (importer != nullptr) |
| 185 | return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).importer; |
| 186 | } |
| 187 | |
| 188 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 189 | } |
| 190 | |
| 191 | bool GPUProfilePartcxx . . $ GPUProfilePart#::provideActivecxx . . $ GPUProfilePart#provideActive(50ce9a9e25b4a850).() const |
| 192 | { |
| 193 | return activecxx . . $ ProfilePart#active(50ce9a9e25b4a850).(); |
| 194 | } |
| 195 | |
| 196 | void GPUProfilePartcxx . . $ GPUProfilePart#::importProfilePartcxx . . $ GPUProfilePart#importProfilePart(d62b6a6dfe9fe695).(IProfilePartcxx . . $ IProfilePart#::Importercxx . . $ IProfilePart#Importer# &i) |
| 197 | { |
| 198 | int oldIndex = index_cxx . . $ GPUProfilePart#index_.; |
| 199 | |
| 200 | auto &gImporter = dynamic_cast<IGPUProfilePartcxx . . $ IGPUProfilePart#::Importercxx . . $ IGPUProfilePart#Importer# &>(i); |
| 201 | index_cxx . . $ GPUProfilePart#index_. = gImporter.provideIndexcxx . . $ IGPUProfilePart#Importer#provideIndex(455f465bc33b4cdf).(); |
| 202 | deviceID_cxx . . $ GPUProfilePart#deviceID_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). gImporter.provideDeviceIDcxx . . $ IGPUProfilePart#Importer#provideDeviceID(f4fff0029955a25f).(); |
| 203 | revision_cxx . . $ GPUProfilePart#revision_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). gImporter.provideRevisioncxx . . $ IGPUProfilePart#Importer#provideRevision(f4fff0029955a25f).(); |
| 204 | uniqueID_cxx . . $ GPUProfilePart#uniqueID_. =cxx . . $ std/optional#`operator=`(9825da7e76d2a34c). gImporter.provideUniqueIDcxx . . $ IGPUProfilePart#Importer#provideUniqueID(5ce91bc52c9d8e1).(); |
| 205 | |
| 206 | if (oldIndex != index_cxx . . $ GPUProfilePart#index_.) |
| 207 | updateKeycxx . . $ GPUProfilePart#updateKey(49f6e7a06ebc5aa8).(); |
| 208 | |
| 209 | for (auto &part : parts_cxx . . $ GPUProfilePart#parts_.) |
| 210 | part->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).importWithcxx . . $ Importable#importWith(94eddebf9440278).(i); |
| 211 | } |
| 212 | |
| 213 | void GPUProfilePartcxx . . $ GPUProfilePart#::exportProfilePartcxx . . $ GPUProfilePart#exportProfilePart(702e13e8794d0da4).(IProfilePartcxx . . $ IProfilePart#::Exportercxx . . $ IProfilePart#Exporter# &e) const |
| 214 | { |
| 215 | auto &gExporter = dynamic_cast<IGPUProfilePartcxx . . $ IGPUProfilePart#::Exportercxx . . $ IGPUProfilePart#Exporter# &>(e); |
| 216 | gExporter.takeIndexcxx . . $ IGPUProfilePart#Exporter#takeIndex(d4f767463ce0a6b3).(index_cxx . . $ GPUProfilePart#index_.); |
| 217 | gExporter.takeDeviceIDcxx . . $ IGPUProfilePart#Exporter#takeDeviceID(9c546c94e5fcce4e).(deviceID_cxx . . $ GPUProfilePart#deviceID_.); |
| 218 | gExporter.takeRevisioncxx . . $ IGPUProfilePart#Exporter#takeRevision(9c546c94e5fcce4e).(revision_cxx . . $ GPUProfilePart#revision_.); |
| 219 | gExporter.takeUniqueIDcxx . . $ IGPUProfilePart#Exporter#takeUniqueID(f63fdbbff1c7c15e).(uniqueID_cxx . . $ GPUProfilePart#uniqueID_.); |
| 220 | |
| 221 | for (auto const &part : parts_cxx . . $ GPUProfilePart#parts_.) |
| 222 | part->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).exportWithcxx . . $ Exportable#exportWith(5b5c94ff60635419).(e); |
| 223 | } |
| 224 | |
| 225 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> GPUProfilePartcxx . . $ GPUProfilePart#::cloneProfilePartcxx . . $ GPUProfilePart#cloneProfilePart(1378fcc1caef3e7b).() const |
| 226 | { |
| 227 | auto clone = stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<GPUProfilePartcxx . . $ GPUProfilePart#>(); |
| 228 | clone->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).deviceID_cxx . . $ GPUProfilePart#deviceID_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). deviceID_cxx . . $ GPUProfilePart#deviceID_.; |
| 229 | clone->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).revision_cxx . . $ GPUProfilePart#revision_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). revision_cxx . . $ GPUProfilePart#revision_.; |
| 230 | clone->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).uniqueID_cxx . . $ GPUProfilePart#uniqueID_. =cxx . . $ std/optional#`operator=`(315b724577b3c69a). uniqueID_cxx . . $ GPUProfilePart#uniqueID_.; |
| 231 | clone->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).index_cxx . . $ GPUProfilePart#index_. = index_cxx . . $ GPUProfilePart#index_.; |
| 232 | clone->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).key_cxx . . $ GPUProfilePart#key_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). key_cxx . . $ GPUProfilePart#key_.; |
| 233 | clone->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).parts_cxx . . $ GPUProfilePart#parts_..reservecxx . . $ std/vector#reserve(2c44cd906ae4e829).(parts_cxx . . $ GPUProfilePart#parts_..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).()); |
| 234 | stdcxx . . $ std/::transformcxx . . $ std/transform(da30451c4a040264).(parts_cxx . . $ GPUProfilePart#parts_..cbegincxx . . $ std/vector#cbegin(d1e1699016b9d7e6).(), parts_cxx . . $ GPUProfilePart#parts_..cendcxx . . $ std/vector#cend(d1e1699016b9d7e6).(), |
| 235 | stdcxx . . $ std/::back_insertercxx . . $ std/back_inserter(7b559d6bdd90ff74).(clone->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).parts_cxx . . $ GPUProfilePart#parts_.), |
| 236 | [](auto const &part) { return part->clone(); }); |
| 237 | |
| 238 | return stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::movecxx . . $ std/move(e35c19a1ba7baa26).(clone); |
| 239 | } |
| 240 | |
| 241 | void GPUProfilePartcxx . . $ GPUProfilePart#::updateKeycxx . . $ GPUProfilePart#updateKey(49f6e7a06ebc5aa8).() |
| 242 | { |
| 243 | key_cxx . . $ GPUProfilePart#key_. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). "GPU" +cxx . . $ std/operator+(39ed2c165380f78e). stdcxx . . $ std/::to_stringcxx . . $ std/__cxx11/to_string(3d81e17e7a87eecc).(index_cxx . . $ GPUProfilePart#index_.); |
| 244 | } |
| 245 | |
| 246 | bool const GPUProfilePartcxx . . $ GPUProfilePart#::registered_cxx . . $ GPUProfilePart#registered_. = ProfilePartProvidercxx . . $ ProfilePartProvider#::registerProvidercxx . . $ ProfilePartProvider#registerProvider(f190789c485b6dcd).( |
| 247 | IGPUcxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::ItemIDcxx . . $ IGPU#ItemID., [cxx . . $ std/function#function(bdc3712e480e4d04).]() { return stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<GPUProfilePartcxx . . $ GPUProfilePart#>(); }); |