diff --git a/example/amdsmi_esmi_intg_example.cc b/example/amdsmi_esmi_intg_example.cc index bc84b7a73d..363124bb01 100644 --- a/example/amdsmi_esmi_intg_example.cc +++ b/example/amdsmi_esmi_intg_example.cc @@ -60,10 +60,10 @@ using namespace std; if (RET != AMDSMI_STATUS_SUCCESS) { \ const char *err_str; \ const char **status_str; \ - std::cout << "AMDSMI call returned " << RET << " at line " \ - << __LINE__ << std::endl; \ - *status_str = amdsmi_get_esmi_err_msg(RET, &err_str); \ - std::cout << *status_str << std::endl; \ + cout << "AMDSMI call returned " << RET << " at line " \ + << __LINE__ << endl; \ + status_str = amdsmi_get_esmi_err_msg(RET, &err_str); \ + cout << *status_str << endl; \ return RET; \ } \ } @@ -85,13 +85,13 @@ int main(int argc, char **argv) { CHK_AMDSMI_RET(ret) // Allocate the memory for the sockets - std::vector sockets(socket_count); + vector sockets(socket_count); // Get the sockets of the system ret = amdsmi_get_cpusocket_handles(&socket_count, &sockets[0]); CHK_AMDSMI_RET(ret) - std::cout << "Total Socket: " << socket_count << std::endl; + cout << "Total Socket: " << socket_count << endl; // For each socket, get identifier and cores for (uint32_t i = 0; i < socket_count; i++) { @@ -99,7 +99,7 @@ int main(int argc, char **argv) { uint32_t socket_info; ret = amdsmi_get_cpusocket_info(sockets[i], socket_info); CHK_AMDSMI_RET(ret) - std::cout << "Socket " << socket_info << std::endl; + cout << "Socket " << socket_info << endl; // Get the core count available for the socket. uint32_t core_count = 0; @@ -107,12 +107,12 @@ int main(int argc, char **argv) { CHK_AMDSMI_RET(ret) // Allocate the memory for the cpu core handles on the socket - std::vector processor_handles(core_count); + vector processor_handles(core_count); // Get all cores of the socket ret = amdsmi_get_cpucore_handles(sockets[i], &core_count, &processor_handles[0]); CHK_AMDSMI_RET(ret) - std::cout << "core_count=" << core_count << std::endl; + cout << "core_count=" << core_count << endl; ret = amdsmi_get_cpu_hsmp_proto_ver(sockets[i], &proto_ver); CHK_AMDSMI_RET(ret) @@ -235,7 +235,6 @@ int main(int argc, char **argv) { } cout<<"\n-------------------------------------------------\n"; -#if 0 uint32_t c_clk = 0; ret = amdsmi_get_cpu_core_current_freq_limit(processor_handles[i], i, &c_clk); CHK_AMDSMI_RET(ret) @@ -243,7 +242,6 @@ int main(int argc, char **argv) { cout<<"--------------------------------------------------------------"; cout<<"\n| CPU["<