| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/components/gpuxmlparser.cpp`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #include "gpuxmlparser.h"cxx . . $ `<file>/src/core/components/gpuxmlparser.h`/ |
| 5 | |
| 6 | #include "core/profilepartxmlparserprovider.h"cxx . . $ `<file>/src/core/profilepartxmlparserprovider.h`/ |
| 7 | #include "igpu.h"cxx . . $ `<file>/src/core/components/igpu.h`/ |
| 8 | #include <utility> |
| 9 | |
| 10 | class GPUXMLParsercxx . . $ GPUXMLParser#::Factorycxx . . $ GPUXMLParser#Factory# final |
| 11 | : public ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::Factorycxx . . $ ProfilePartXMLParser#Factory# |
| 12 | , public IGPUProfilePartcxx . . $ IGPUProfilePart#::Exportercxx . . $ IGPUProfilePart#Exporter# |
| 13 | { |
| 14 | public: |
| 15 | Factorycxx . . $ GPUXMLParser#Factory#Factory(8a9a90f29fc8def2).(IProfilePartXMLParserProvidercxx . . $ IProfilePartXMLParserProvider# const &profilePartParserProvider, |
| 16 | GPUXMLParsercxx . . $ GPUXMLParser# &parser) noexcept |
| 17 | : ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::Factorycxx . . $ ProfilePartXMLParser#Factory#(profilePartParserProvider) |
| 18 | , outer_cxx . . $ GPUXMLParser#Factory#outer_.(parser) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | void takePartParsercxx . . $ GPUXMLParser#Factory#takePartParser(4ce663d5ecbeb887).(Itemcxx . . $ Item# const &i, |
| 23 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartXMLParsercxx . . $ IProfilePartXMLParser#> &&part) override; |
| 24 | |
| 25 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 26 | provideExportercxx . . $ GPUXMLParser#Factory#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) override; |
| 27 | |
| 28 | void takeActivecxx . . $ GPUXMLParser#Factory#takeActive(b45ddcbc8423892c).(bool) override |
| 29 | { |
| 30 | } |
| 31 | |
| 32 | void takeIndexcxx . . $ GPUXMLParser#Factory#takeIndex(d4f767463ce0a6b3).(int) override |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | void takeDeviceIDcxx . . $ GPUXMLParser#Factory#takeDeviceID(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &) override |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | void takeRevisioncxx . . $ GPUXMLParser#Factory#takeRevision(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &) override |
| 41 | { |
| 42 | } |
| 43 | |
| 44 | void takeUniqueIDcxx . . $ GPUXMLParser#Factory#takeUniqueID(f63fdbbff1c7c15e).(stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#>) override |
| 45 | { |
| 46 | } |
| 47 | |
| 48 | private: |
| 49 | GPUXMLParsercxx . . $ GPUXMLParser# &outer_cxx . . $ GPUXMLParser#Factory#outer_.; |
| 50 | }; |
| 51 | |
| 52 | void GPUXMLParsercxx . . $ GPUXMLParser#::Factorycxx . . $ GPUXMLParser#Factory#::takePartParsercxx . . $ GPUXMLParser#Factory#takePartParser(4ce663d5ecbeb887).( |
| 53 | Itemcxx . . $ Item# const &i, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartXMLParsercxx . . $ IProfilePartXMLParser#> &&part) |
| 54 | { |
| 55 | outer_cxx . . $ GPUXMLParser#Factory#outer_..parsers_cxx . . $ GPUXMLParser#parsers_..emplacecxx . . $ std/unordered_map#emplace(8e800962ae7274b6).(i.IDcxx . . $ Item#ID(f4fff0029955a25f).(), stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(part)); |
| 56 | } |
| 57 | |
| 58 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 59 | GPUXMLParsercxx . . $ GPUXMLParser#::Factorycxx . . $ GPUXMLParser#Factory#::provideExportercxx . . $ GPUXMLParser#Factory#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) |
| 60 | { |
| 61 | if (i.IDcxx . . $ Item#ID(f4fff0029955a25f).() == IGPUcxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::ItemIDcxx . . $ IGPU#ItemID.) |
| 62 | return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).this; |
| 63 | else |
| 64 | return factorycxx . . $ ProfilePartXMLParser#Factory#factory(3acccbde2694e33a).(i); |
| 65 | } |
| 66 | |
| 67 | class GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer# final : public IGPUProfilePartcxx . . $ IGPUProfilePart#::Exportercxx . . $ IGPUProfilePart#Exporter# |
| 68 | { |
| 69 | public: |
| 70 | Initializercxx . . $ GPUXMLParser#Initializer#Initializer(3420fe746dc339f6).(GPUXMLParsercxx . . $ GPUXMLParser# &outer) noexcept |
| 71 | : outer_cxx . . $ GPUXMLParser#Initializer#outer_.(outer) |
| 72 | { |
| 73 | } |
| 74 | |
| 75 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 76 | provideExportercxx . . $ GPUXMLParser#Initializer#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) override; |
| 77 | |
| 78 | void takeActivecxx . . $ GPUXMLParser#Initializer#takeActive(b45ddcbc8423892c).(bool active) override; |
| 79 | void takeIndexcxx . . $ GPUXMLParser#Initializer#takeIndex(d4f767463ce0a6b3).(int index) override; |
| 80 | void takeDeviceIDcxx . . $ GPUXMLParser#Initializer#takeDeviceID(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &deviceID) override; |
| 81 | void takeRevisioncxx . . $ GPUXMLParser#Initializer#takeRevision(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &revision) override; |
| 82 | void takeUniqueIDcxx . . $ GPUXMLParser#Initializer#takeUniqueID(f63fdbbff1c7c15e).(stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> uniqueID) override; |
| 83 | |
| 84 | private: |
| 85 | GPUXMLParsercxx . . $ GPUXMLParser# &outer_cxx . . $ GPUXMLParser#Initializer#outer_.; |
| 86 | 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 . . $ GPUXMLParser#Initializer#initializers_.; |
| 87 | }; |
| 88 | |
| 89 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 90 | GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer#::provideExportercxx . . $ GPUXMLParser#Initializer#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) |
| 91 | { |
| 92 | auto &id = i.IDcxx . . $ Item#ID(f4fff0029955a25f).(); |
| 93 | if (outer_cxx . . $ GPUXMLParser#Initializer#outer_..parsers_cxx . . $ GPUXMLParser#parsers_..countcxx . . $ std/unordered_map#count(b71ff106d381144b).(id) > 0) { |
| 94 | if (initializers_cxx . . $ GPUXMLParser#Initializer#initializers_..countcxx . . $ std/unordered_map#count(b71ff106d381144b).(id) > 0) |
| 95 | return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).initializers_cxx . . $ GPUXMLParser#Initializer#initializers_..atcxx . . $ std/unordered_map#at(4f10b6009f0ee734).(id); |
| 96 | else { |
| 97 | auto initializer = outer_cxx . . $ GPUXMLParser#Initializer#outer_..parsers_cxx . . $ GPUXMLParser#parsers_..atcxx . . $ std/unordered_map#at(4f10b6009f0ee734).(id)->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).initializercxx . . $ IProfilePartXMLParser#initializer(6b4e1016740e578).(); |
| 98 | if (initializer != nullptr) { |
| 99 | initializers_cxx . . $ GPUXMLParser#Initializer#initializers_..emplacecxx . . $ std/unordered_map#emplace(8e800962ae7274b6).(id, stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(initializer)); |
| 100 | return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).initializers_cxx . . $ GPUXMLParser#Initializer#initializers_..atcxx . . $ std/unordered_map#at(4f10b6009f0ee734).(id); |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 106 | } |
| 107 | |
| 108 | void GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer#::takeActivecxx . . $ GPUXMLParser#Initializer#takeActive(b45ddcbc8423892c).(bool active) |
| 109 | { |
| 110 | outer_cxx . . $ GPUXMLParser#Initializer#outer_..active_cxx . . $ GPUXMLParser#active_. = outer_cxx . . $ GPUXMLParser#Initializer#outer_..activeDefault_cxx . . $ GPUXMLParser#activeDefault_. = active; |
| 111 | } |
| 112 | |
| 113 | void GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer#::takeIndexcxx . . $ GPUXMLParser#Initializer#takeIndex(d4f767463ce0a6b3).(int index) |
| 114 | { |
| 115 | outer_cxx . . $ GPUXMLParser#Initializer#outer_..index_cxx . . $ GPUXMLParser#index_. = outer_cxx . . $ GPUXMLParser#Initializer#outer_..indexDefault_cxx . . $ GPUXMLParser#indexDefault_. = index; |
| 116 | } |
| 117 | |
| 118 | void GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer#::takeDeviceIDcxx . . $ GPUXMLParser#Initializer#takeDeviceID(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &deviceID) |
| 119 | { |
| 120 | outer_cxx . . $ GPUXMLParser#Initializer#outer_..deviceID_cxx . . $ GPUXMLParser#deviceID_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). outer_cxx . . $ GPUXMLParser#Initializer#outer_..deviceIDDefault_cxx . . $ GPUXMLParser#deviceIDDefault_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). deviceID; |
| 121 | } |
| 122 | |
| 123 | void GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer#::takeRevisioncxx . . $ GPUXMLParser#Initializer#takeRevision(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &revision) |
| 124 | { |
| 125 | outer_cxx . . $ GPUXMLParser#Initializer#outer_..revision_cxx . . $ GPUXMLParser#revision_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). outer_cxx . . $ GPUXMLParser#Initializer#outer_..revisionDefault_cxx . . $ GPUXMLParser#revisionDefault_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). revision; |
| 126 | } |
| 127 | |
| 128 | void GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer#::takeUniqueIDcxx . . $ GPUXMLParser#Initializer#takeUniqueID(f63fdbbff1c7c15e).(stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> uniqueID) |
| 129 | { |
| 130 | outer_cxx . . $ GPUXMLParser#Initializer#outer_..uniqueID_cxx . . $ GPUXMLParser#uniqueID_. =cxx . . $ std/optional#`operator=`(315b724577b3c69a). outer_cxx . . $ GPUXMLParser#Initializer#outer_..uniqueIDDefault_cxx . . $ GPUXMLParser#uniqueIDDefault_. =cxx . . $ std/optional#`operator=`(315b724577b3c69a). uniqueID; |
| 131 | } |
| 132 | |
| 133 | GPUXMLParsercxx . . $ GPUXMLParser#::GPUXMLParsercxx . . $ GPUXMLParser#GPUXMLParser(ced63f7c635d850d).() noexcept |
| 134 | : ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#(IGPUcxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::ItemIDcxx . . $ IGPU#ItemID., *this, *this) |
| 135 | { |
| 136 | } |
| 137 | |
| 138 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> GPUXMLParsercxx . . $ GPUXMLParser#::factorycxx . . $ GPUXMLParser#factory(543373651c38a5a4).( |
| 139 | IProfilePartXMLParserProvidercxx . . $ IProfilePartXMLParserProvider# const &profilePartParserProvider) |
| 140 | { |
| 141 | return stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<GPUXMLParsercxx . . $ GPUXMLParser#::Factorycxx . . $ GPUXMLParser#Factory#>(profilePartParserProvider, |
| 142 | *this); |
| 143 | } |
| 144 | |
| 145 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> GPUXMLParsercxx . . $ GPUXMLParser#::initializercxx . . $ GPUXMLParser#initializer(6b4e1016740e578).() |
| 146 | { |
| 147 | return stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<GPUXMLParsercxx . . $ GPUXMLParser#::Initializercxx . . $ GPUXMLParser#Initializer#>(*this); |
| 148 | } |
| 149 | |
| 150 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 151 | GPUXMLParsercxx . . $ GPUXMLParser#::provideExportercxx . . $ GPUXMLParser#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &i) |
| 152 | { |
| 153 | auto parserIt = parsers_cxx . . $ GPUXMLParser#parsers_..findcxx . . $ std/unordered_map#find(f711f2f81556fe93).(i.IDcxx . . $ Item#ID(f4fff0029955a25f).()); |
| 154 | if (parserIt != parsers_cxx . . $ GPUXMLParser#parsers_..cendcxx . . $ std/unordered_map#cend(f3c6e12ee1fe7252).()) |
| 155 | return parserItcxx . . $ std/optional#optional(e3f0d6382bd52f24).->cxx . . $ std/__detail/_Node_iterator#`operator->`(35610babf8706b50).secondcxx . . $ std/pair#second.->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).profilePartExportercxx . . $ IProfilePartXMLParser#profilePartExporter(611f04e96fb8b68a).(); |
| 156 | |
| 157 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 158 | } |
| 159 | |
| 160 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer#>> |
| 161 | GPUXMLParsercxx . . $ GPUXMLParser#::provideImportercxx . . $ GPUXMLParser#provideImporter(c13a3bcac0db4745).(Itemcxx . . $ Item# const &i) |
| 162 | { |
| 163 | auto parserIt = parsers_cxx . . $ GPUXMLParser#parsers_..findcxx . . $ std/unordered_map#find(f711f2f81556fe93).(i.IDcxx . . $ Item#ID(f4fff0029955a25f).()); |
| 164 | if (parserIt != parsers_cxx . . $ GPUXMLParser#parsers_..cendcxx . . $ std/unordered_map#cend(f3c6e12ee1fe7252).()) |
| 165 | return parserItcxx . . $ std/optional#optional(e3f0d6382bd52f24).->cxx . . $ std/__detail/_Node_iterator#`operator->`(35610babf8706b50).secondcxx . . $ std/pair#second.->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).profilePartImportercxx . . $ IProfilePartXMLParser#profilePartImporter(c6a8a54be61afbf2).(); |
| 166 | |
| 167 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 168 | } |
| 169 | |
| 170 | void GPUXMLParsercxx . . $ GPUXMLParser#::takeActivecxx . . $ GPUXMLParser#takeActive(b45ddcbc8423892c).(bool active) |
| 171 | { |
| 172 | active_cxx . . $ GPUXMLParser#active_. = active; |
| 173 | } |
| 174 | |
| 175 | bool GPUXMLParsercxx . . $ GPUXMLParser#::provideActivecxx . . $ GPUXMLParser#provideActive(50ce9a9e25b4a850).() const |
| 176 | { |
| 177 | return active_cxx . . $ GPUXMLParser#active_.; |
| 178 | } |
| 179 | |
| 180 | void GPUXMLParsercxx . . $ GPUXMLParser#::takeIndexcxx . . $ GPUXMLParser#takeIndex(d4f767463ce0a6b3).(int index) |
| 181 | { |
| 182 | index_cxx . . $ GPUXMLParser#index_. = index; |
| 183 | } |
| 184 | |
| 185 | int GPUXMLParsercxx . . $ GPUXMLParser#::provideIndexcxx . . $ GPUXMLParser#provideIndex(455f465bc33b4cdf).() const |
| 186 | { |
| 187 | return index_cxx . . $ GPUXMLParser#index_.; |
| 188 | } |
| 189 | |
| 190 | void GPUXMLParsercxx . . $ GPUXMLParser#::takeDeviceIDcxx . . $ GPUXMLParser#takeDeviceID(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &deviceID) |
| 191 | { |
| 192 | deviceID_cxx . . $ GPUXMLParser#deviceID_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). deviceID; |
| 193 | } |
| 194 | |
| 195 | stdcxx . . $ std/::stringcxx . . $ std/string# const &GPUXMLParsercxx . . $ GPUXMLParser#::provideDeviceIDcxx . . $ GPUXMLParser#provideDeviceID(f4fff0029955a25f).() const |
| 196 | { |
| 197 | return deviceID_cxx . . $ GPUXMLParser#deviceID_.; |
| 198 | } |
| 199 | |
| 200 | void GPUXMLParsercxx . . $ GPUXMLParser#::takeRevisioncxx . . $ GPUXMLParser#takeRevision(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &revision) |
| 201 | { |
| 202 | revision_cxx . . $ GPUXMLParser#revision_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). revision; |
| 203 | } |
| 204 | |
| 205 | stdcxx . . $ std/::stringcxx . . $ std/string# const &GPUXMLParsercxx . . $ GPUXMLParser#::provideRevisioncxx . . $ GPUXMLParser#provideRevision(f4fff0029955a25f).() const |
| 206 | { |
| 207 | return revision_cxx . . $ GPUXMLParser#revision_.; |
| 208 | } |
| 209 | |
| 210 | void GPUXMLParsercxx . . $ GPUXMLParser#::takeUniqueIDcxx . . $ GPUXMLParser#takeUniqueID(f63fdbbff1c7c15e).(stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> uniqueID) |
| 211 | { |
| 212 | uniqueID_cxx . . $ GPUXMLParser#uniqueID_. =cxx . . $ std/optional#`operator=`(315b724577b3c69a). uniqueID; |
| 213 | } |
| 214 | |
| 215 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> GPUXMLParsercxx . . $ GPUXMLParser#::provideUniqueIDcxx . . $ GPUXMLParser#provideUniqueID(5ce91bc52c9d8e1).() const |
| 216 | { |
| 217 | return uniqueID_cxx . . $ GPUXMLParser#uniqueID_.; |
| 218 | } |
| 219 | |
| 220 | void GPUXMLParsercxx . . $ GPUXMLParser#::appendTocxx . . $ GPUXMLParser#appendTo(9a62add8cbc6c333).(pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# &parentNode) |
| 221 | { |
| 222 | auto gpuNode = parentNode.append_childcxx . . $ pugi/xml_node#append_child(625782b904aa9aa5).(IDcxx . . $ ProfilePartXMLParser#ID(f4fff0029955a25f).().c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 223 | gpuNode.append_attributecxx . . $ pugi/xml_node#append_attribute(ebf82b7b6f96d3a9).("active") =cxx . . $ pugi/xml_attribute#`operator=`(e4ef2dfcdb6b654d). active_cxx . . $ GPUXMLParser#active_.; |
| 224 | gpuNode.append_attributecxx . . $ pugi/xml_node#append_attribute(ebf82b7b6f96d3a9).("index") =cxx . . $ pugi/xml_attribute#`operator=`(769340c9bf9aab17). index_cxx . . $ GPUXMLParser#index_.; |
| 225 | gpuNode.append_attributecxx . . $ pugi/xml_node#append_attribute(ebf82b7b6f96d3a9).("deviceid") =cxx . . $ pugi/xml_attribute#`operator=`(e97dd6b1417bcd5a). deviceID_cxx . . $ GPUXMLParser#deviceID_..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(); |
| 226 | gpuNode.append_attributecxx . . $ pugi/xml_node#append_attribute(ebf82b7b6f96d3a9).("revision") =cxx . . $ pugi/xml_attribute#`operator=`(e97dd6b1417bcd5a). revision_cxx . . $ GPUXMLParser#revision_..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(); |
| 227 | |
| 228 | if (uniqueID_cxx . . $ GPUXMLParser#uniqueID_..has_valuecxx . . $ std/optional#has_value(3482b152b9333168).()) |
| 229 | gpuNode.append_attributecxx . . $ pugi/xml_node#append_attribute(ebf82b7b6f96d3a9).("uniqueid") =cxx . . $ pugi/xml_attribute#`operator=`(e97dd6b1417bcd5a). uniqueID_cxx . . $ GPUXMLParser#uniqueID_.->cxx . . $ std/optional#`operator->`(258ee1c9e0a18a5c).c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(); |
| 230 | |
| 231 | for (auto &[key, component] : parsers_cxx . . $ GPUXMLParser#parsers_.) |
| 232 | component->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).appendTocxx . . $ IProfilePartXMLParser#appendTo(9a62add8cbc6c333).(gpuNode); |
| 233 | } |
| 234 | |
| 235 | void GPUXMLParsercxx . . $ GPUXMLParser#::resetAttributescxx . . $ GPUXMLParser#resetAttributes(49f6e7a06ebc5aa8).() |
| 236 | { |
| 237 | active_cxx . . $ GPUXMLParser#active_. = activeDefault_cxx . . $ GPUXMLParser#activeDefault_.; |
| 238 | index_cxx . . $ GPUXMLParser#index_. = indexDefault_cxx . . $ GPUXMLParser#indexDefault_.; |
| 239 | deviceID_cxx . . $ GPUXMLParser#deviceID_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). deviceIDDefault_cxx . . $ GPUXMLParser#deviceIDDefault_.; |
| 240 | revision_cxx . . $ GPUXMLParser#revision_. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). revisionDefault_cxx . . $ GPUXMLParser#revisionDefault_.; |
| 241 | uniqueID_cxx . . $ GPUXMLParser#uniqueID_. =cxx . . $ std/optional#`operator=`(315b724577b3c69a). uniqueIDDefault_cxx . . $ GPUXMLParser#uniqueIDDefault_.; |
| 242 | } |
| 243 | |
| 244 | void GPUXMLParsercxx . . $ GPUXMLParser#::loadPartFromcxx . . $ GPUXMLParser#loadPartFrom(ad773084382c4c72).(pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# const &parentNode) |
| 245 | { |
| 246 | auto gpuNode = parentNode.find_childcxx . . $ pugi/xml_node#find_child(4699405ca595259d).([&](pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# const &node) { |
| 247 | // match gpu node |
| 248 | if (node.namecxx . . $ pugi/xml_node#name(a9f41ea0e82d88cf).() != IDcxx . . $ ProfilePartXMLParser#ID(f4fff0029955a25f).()) |
| 249 | return false; |
| 250 | |
| 251 | // try to match specific gpu by uniqueid attribute |
| 252 | auto uniqueID = node.attributecxx . . $ pugi/xml_node#attribute(760b1819de0561d9).("uniqueid").as_stringcxx . . $ pugi/xml_attribute#as_string(865ea18671f48fc1).(); |
| 253 | if (*uniqueID != 0 && uniqueID_cxx . . $ GPUXMLParser#uniqueID_..has_valuecxx . . $ std/optional#has_value(3482b152b9333168).()) |
| 254 | return uniqueID_cxx . . $ GPUXMLParser#uniqueID_. ==cxx . . $ std/`operator==`(348876303c74c3ee). uniqueID; |
| 255 | |
| 256 | // match specific gpu by index, deviceid and revision attributes |
| 257 | return node.attributecxx . . $ pugi/xml_node#attribute(760b1819de0561d9).("index").as_intcxx . . $ pugi/xml_attribute#as_int(7ccb52b1bfe01045).(-1) == index_cxx . . $ GPUXMLParser#index_. && |
| 258 | node.attributecxx . . $ pugi/xml_node#attribute(760b1819de0561d9).("deviceid").as_stringcxx . . $ pugi/xml_attribute#as_string(865ea18671f48fc1).() == deviceID_cxx . . $ GPUXMLParser#deviceID_. && |
| 259 | node.attributecxx . . $ pugi/xml_node#attribute(760b1819de0561d9).("revision").as_stringcxx . . $ pugi/xml_attribute#as_string(865ea18671f48fc1).() == revision_cxx . . $ GPUXMLParser#revision_.; |
| 260 | }); |
| 261 | |
| 262 | active_cxx . . $ GPUXMLParser#active_. = gpuNode.attributecxx . . $ pugi/xml_node#attribute(760b1819de0561d9).("active").as_boolcxx . . $ pugi/xml_attribute#as_bool(962fae8be55e1d9).(activeDefault_cxx . . $ GPUXMLParser#activeDefault_.); |
| 263 | |
| 264 | for (auto &[key, component] : parsers_cxx . . $ GPUXMLParser#parsers_.) |
| 265 | component->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).loadFromcxx . . $ IProfilePartXMLParser#loadFrom(ad773084382c4c72).(gpuNode); |
| 266 | } |
| 267 | |
| 268 | bool const GPUXMLParsercxx . . $ GPUXMLParser#::registered_cxx . . $ GPUXMLParser#registered_. = |
| 269 | ProfilePartXMLParserProvidercxx . . $ ProfilePartXMLParserProvider#::registerProvidercxx . . $ ProfilePartXMLParserProvider#registerProvider(1a5cc5494db8b601).( |
| 270 | 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).<GPUXMLParsercxx . . $ GPUXMLParser#>(); }); |