Files
compute-runtime/level_zero/tools/source/sysman/ras/ras_imp.cpp
Jaime Arteaga 902fc2f6c4 level-zero v1.0 (2/N)
Change-Id: I1419231a721fab210e166d26a264cae04d661dcd
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: macabral <matias.a.cabral@intel.com>
Signed-off-by: davidoli <david.olien@intel.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2020-08-03 13:11:13 +02:00

51 lines
1.1 KiB
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/tools/source/sysman/ras/ras_imp.h"
#include "shared/source/helpers/debug_helpers.h"
#include "shared/source/helpers/string.h"
#include <cstring>
namespace L0 {
ze_result_t RasImp::rasGetProperties(zes_ras_properties_t *pProperties) {
rasProperties.type = this->rasErrorType;
rasProperties.onSubdevice = false;
rasProperties.subdeviceId = 0;
*pProperties = rasProperties;
return ZE_RESULT_SUCCESS;
}
ze_result_t RasImp::rasGetConfig(zes_ras_config_t *pConfig) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
ze_result_t RasImp::rasSetConfig(const zes_ras_config_t *pConfig) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
void RasImp::init() {
pOsRas->setRasErrorType(this->rasErrorType);
isRasErrorSupported = pOsRas->isRasSupported();
}
RasImp::RasImp(OsSysman *pOsSysman, zes_ras_error_type_t type) {
pOsRas = OsRas::create(pOsSysman);
this->rasErrorType = type;
init();
}
RasImp::~RasImp() {
if (nullptr != pOsRas) {
delete pOsRas;
}
}
} // namespace L0