Files
compute-runtime/level_zero/tools/source/sysman/diagnostics/diagnostics_imp.cpp
Vilvaraj, T J Vivek 457d05420d sysman: add diagnostics boilerplate code
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-03-19 05:33:20 +01:00

37 lines
750 B
C++

/*
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "diagnostics_imp.h"
#include "shared/source/helpers/debug_helpers.h"
#include "os_diagnostics.h"
#include <cmath>
namespace L0 {
ze_result_t DiagnosticsImp::diagnosticsGetProperties(zes_diag_properties_t *pProperties) {
pOsDiagnostics->osGetDiagProperties(pProperties);
return ZE_RESULT_SUCCESS;
}
void DiagnosticsImp::init() {
this->isDiagnosticsEnabled = pOsDiagnostics->isDiagnosticsSupported();
}
DiagnosticsImp::DiagnosticsImp(OsSysman *pOsSysman) {
pOsDiagnostics = OsDiagnostics::create(pOsSysman);
UNRECOVERABLE_IF(nullptr == pOsDiagnostics);
init();
}
DiagnosticsImp::~DiagnosticsImp() {
}
} // namespace L0