mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 12:11:31 +08:00
Implement RAS APIs
- Implement zetSysmanRasGet API Change-Id: Ic2a82ceac2619cd1955d4e39924228f94ecd42dd
This commit is contained in:
committed by
sys_ocldev
parent
5374a0ffc1
commit
749e59fc54
@@ -21,7 +21,18 @@ void RasHandleContext::init() {
|
||||
}
|
||||
|
||||
ze_result_t RasHandleContext::rasGet(uint32_t *pCount, zet_sysman_ras_handle_t *phRas) {
|
||||
*pCount = 0;
|
||||
if (nullptr == phRas) {
|
||||
*pCount = static_cast<uint32_t>(handleList.size());
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
uint32_t i = 0;
|
||||
for (Ras *ras : handleList) {
|
||||
if (i >= *pCount) {
|
||||
break;
|
||||
}
|
||||
phRas[i++] = ras->toHandle();
|
||||
}
|
||||
*pCount = i;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user