Files
compute-runtime/level_zero/tools/source/sysman/linux/pmt/pmt_helper.cpp
Bellekallu Rajkiran 922a224cc9 Add prelim support for temperature, power and global operations
Related-To: LOCI-2864

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2022-03-03 18:11:34 +01:00

25 lines
772 B
C++

/*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/tools/source/sysman/linux/pmt/pmt.h"
#include "level_zero/tools/source/sysman/linux/pmt/pmt_xml_offsets.h"
namespace L0 {
ze_result_t PlatformMonitoringTech::getKeyOffsetMap(std::string guid, std::map<std::string, uint64_t> &keyOffsetMap) {
ze_result_t retVal = ZE_RESULT_ERROR_UNKNOWN;
auto keyOffsetMapEntry = guidToKeyOffsetMap.find(guid);
if (keyOffsetMapEntry == guidToKeyOffsetMap.end()) {
// We didnt have any entry for this guid in guidToKeyOffsetMap
retVal = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
return retVal;
}
keyOffsetMap = keyOffsetMapEntry->second;
return ZE_RESULT_SUCCESS;
}
} // namespace L0