Change AMDSmiDevice to AMDSmiProcessor
grep -rli 'AMDSmiDevice' * | xargs -i@ sed -i 's/AMDSmiDevice/AMDSmiProcessor/g' @ Change-Id: Ib71e11d7122699cc62df3c4e9711ce3fc51e6fdf
This commit is contained in:
committato da
Naveen Krishna Chatradhi
parent
6cce103fba
commit
c4aa7d2c03
@@ -41,18 +41,18 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AMD_SMI_INCLUDE_AMD_SMI_DEVICE_H_
|
||||
#define AMD_SMI_INCLUDE_AMD_SMI_DEVICE_H_
|
||||
#ifndef AMD_SMI_INCLUDE_AMD_SMI_PROCESSOR_H_
|
||||
#define AMD_SMI_INCLUDE_AMD_SMI_PROCESSOR_H_
|
||||
|
||||
#include "amd_smi/amdsmi.h"
|
||||
|
||||
namespace amd {
|
||||
namespace smi {
|
||||
|
||||
class AMDSmiDevice {
|
||||
class AMDSmiProcessor {
|
||||
public:
|
||||
explicit AMDSmiDevice(device_type_t device) : device_type_(device) {}
|
||||
virtual ~AMDSmiDevice() {}
|
||||
explicit AMDSmiProcessor(device_type_t device) : device_type_(device) {}
|
||||
virtual ~AMDSmiProcessor() {}
|
||||
device_type_t get_device_type() const { return device_type_;}
|
||||
private:
|
||||
device_type_t device_type_;
|
||||
@@ -62,4 +62,4 @@ class AMDSmiDevice {
|
||||
} // namespace smi
|
||||
} // namespace amd
|
||||
|
||||
#endif // AMD_SMI_INCLUDE_AMD_SMI_DEVICE_H_
|
||||
#endif // AMD_SMI_INCLUDE_AMD_SMI_PROCESSOR_H_
|
||||
|
||||
@@ -52,13 +52,13 @@
|
||||
namespace amd {
|
||||
namespace smi {
|
||||
|
||||
class AMDSmiGPUDevice: public AMDSmiDevice {
|
||||
class AMDSmiGPUDevice: public AMDSmiProcessor {
|
||||
public:
|
||||
AMDSmiGPUDevice(uint32_t gpu_id, uint32_t fd, std::string path, amdsmi_bdf_t bdf, AMDSmiDrm& drm):
|
||||
AMDSmiDevice(AMD_GPU), gpu_id_(gpu_id), fd_(fd), path_(path), bdf_(bdf), drm_(drm) {}
|
||||
AMDSmiProcessor(AMD_GPU), gpu_id_(gpu_id), fd_(fd), path_(path), bdf_(bdf), drm_(drm) {}
|
||||
|
||||
AMDSmiGPUDevice(uint32_t gpu_id, AMDSmiDrm& drm):
|
||||
AMDSmiDevice(AMD_GPU), gpu_id_(gpu_id), drm_(drm) {
|
||||
AMDSmiProcessor(AMD_GPU), gpu_id_(gpu_id), drm_(drm) {
|
||||
if (check_if_drm_is_supported()) this->get_drm_data();
|
||||
}
|
||||
~AMDSmiGPUDevice() {
|
||||
|
||||
@@ -58,12 +58,12 @@ class AMDSmiSocket {
|
||||
explicit AMDSmiSocket(const std::string& id) : socket_identifier_(id) {}
|
||||
~AMDSmiSocket();
|
||||
const std::string& get_socket_id() const { return socket_identifier_;}
|
||||
void add_device(AMDSmiDevice* device) { devices_.push_back(device); }
|
||||
std::vector<AMDSmiDevice*>& get_devices() { return devices_;}
|
||||
void add_device(AMDSmiProcessor* device) { devices_.push_back(device); }
|
||||
std::vector<AMDSmiProcessor*>& get_devices() { return devices_;}
|
||||
amdsmi_status_t get_device_count(uint32_t* device_count) const;
|
||||
private:
|
||||
std::string socket_identifier_;
|
||||
std::vector<AMDSmiDevice*> devices_;
|
||||
std::vector<AMDSmiProcessor*> devices_;
|
||||
};
|
||||
|
||||
} // namespace smi
|
||||
|
||||
@@ -70,7 +70,7 @@ class AMDSmiSystem {
|
||||
AMDSmiSocket** socket);
|
||||
|
||||
amdsmi_status_t handle_to_device(amdsmi_device_handle device_handle,
|
||||
AMDSmiDevice** device);
|
||||
AMDSmiProcessor** device);
|
||||
|
||||
amdsmi_status_t gpu_index_to_handle(uint32_t gpu_index,
|
||||
amdsmi_device_handle* device_handle);
|
||||
@@ -82,7 +82,7 @@ class AMDSmiSystem {
|
||||
uint64_t init_flag_;
|
||||
AMDSmiDrm drm_;
|
||||
std::vector<AMDSmiSocket*> sockets_;
|
||||
std::set<AMDSmiDevice*> devices_; // Track valid devices
|
||||
std::set<AMDSmiProcessor*> devices_; // Track valid devices
|
||||
};
|
||||
|
||||
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user