Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-02-27 07:19:50

0001 #ifndef DataFormats_Provenance_interface_HardwareResourcesDescription_h
0002 #define DataFormats_Provenance_interface_HardwareResourcesDescription_h
0003 
0004 #include <iosfwd>
0005 #include <string>
0006 #include <string_view>
0007 #include <vector>
0008 
0009 namespace edm {
0010   /**
0011    * Description of various hardware details stored as part of
0012    * ProcessConfiguration
0013    *
0014    * An object can be serialized as a string. An object with empty
0015    * content will be serialized as an empty string (this was a simple
0016    * way to preserve backwards (and forwards) compatibility in
0017    * ProcessHistory for the ID checksum)
0018    */
0019   struct HardwareResourcesDescription {
0020     HardwareResourcesDescription() = default;
0021     explicit HardwareResourcesDescription(std::string_view serialized);
0022 
0023     std::string serialize() const;
0024 
0025     bool operator==(HardwareResourcesDescription const& other) const;
0026 
0027     std::string microarchitecture;
0028     std::vector<std::string> cpuModels;
0029     std::vector<std::string> selectedAccelerators;
0030     std::vector<std::string> gpuModels;
0031   };
0032 
0033   std::ostream& operator<<(std::ostream& os, HardwareResourcesDescription const& rd);
0034 }  // namespace edm
0035 
0036 #endif