mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: Switch EventDescriptor initialization to designated initializers
Related-To: NEO-12287 Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3560b016bd
commit
ecc96a9ab4
@@ -308,19 +308,19 @@ ze_result_t Event::openCounterBasedIpcHandle(const IpcCounterBasedEventData &ipc
|
||||
ipcData.counterValue, ipcData.devicePartitions, ipcData.hostPartitions);
|
||||
|
||||
const EventDescriptor eventDescriptor = {
|
||||
nullptr, // eventPoolAllocation
|
||||
nullptr, // extensions
|
||||
0, // totalEventSize
|
||||
EventPacketsCount::maxKernelSplit, // maxKernelCount
|
||||
1, // maxPacketsCount
|
||||
ipcData.counterBasedFlags, // counterBasedFlags
|
||||
0, // index
|
||||
ipcData.signalScopeFlags, // signalScope
|
||||
ipcData.waitScopeFlags, // waitScope
|
||||
false, // timestampPool
|
||||
false, // kernelMappedTsPoolFlag
|
||||
true, // importedIpcPool
|
||||
false, // ipcPool
|
||||
.eventPoolAllocation = nullptr,
|
||||
.extensions = nullptr,
|
||||
.totalEventSize = 0,
|
||||
.maxKernelCount = EventPacketsCount::maxKernelSplit,
|
||||
.maxPacketsCount = 1,
|
||||
.counterBasedFlags = ipcData.counterBasedFlags,
|
||||
.index = 0,
|
||||
.signalScope = ipcData.signalScopeFlags,
|
||||
.waitScope = ipcData.waitScopeFlags,
|
||||
.timestampPool = false,
|
||||
.kernelMappedTsPoolFlag = false,
|
||||
.importedIpcPool = true,
|
||||
.ipcPool = false,
|
||||
};
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
|
||||
@@ -119,19 +119,19 @@ Event *Event::create(const EventDescriptor &eventDescriptor, Device *device, ze_
|
||||
template <typename TagSizeT>
|
||||
Event *Event::create(EventPool *eventPool, const ze_event_desc_t *desc, Device *device) {
|
||||
EventDescriptor eventDescriptor = {
|
||||
&eventPool->getAllocation(), // eventPoolAllocation
|
||||
desc->pNext, // extensions
|
||||
eventPool->getEventSize(), // totalEventSize
|
||||
eventPool->getMaxKernelCount(), // maxKernelCount
|
||||
eventPool->getEventMaxPackets(), // maxPacketsCount
|
||||
eventPool->getCounterBasedFlags(), // counterBasedFlags
|
||||
desc->index, // index
|
||||
desc->signal, // signalScope
|
||||
desc->wait, // waitScope
|
||||
eventPool->isEventPoolTimestampFlagSet(), // timestampPool
|
||||
eventPool->isEventPoolKernelMappedTsFlagSet(), // kernelMappedTsPoolFlag
|
||||
eventPool->getImportedIpcPool(), // importedIpcPool
|
||||
eventPool->isIpcPoolFlagSet(), // ipcPool
|
||||
.eventPoolAllocation = &eventPool->getAllocation(),
|
||||
.extensions = desc->pNext,
|
||||
.totalEventSize = eventPool->getEventSize(),
|
||||
.maxKernelCount = eventPool->getMaxKernelCount(),
|
||||
.maxPacketsCount = eventPool->getEventMaxPackets(),
|
||||
.counterBasedFlags = eventPool->getCounterBasedFlags(),
|
||||
.index = desc->index,
|
||||
.signalScope = desc->signal,
|
||||
.waitScope = desc->wait,
|
||||
.timestampPool = eventPool->isEventPoolTimestampFlagSet(),
|
||||
.kernelMappedTsPoolFlag = eventPool->isEventPoolKernelMappedTsFlagSet(),
|
||||
.importedIpcPool = eventPool->getImportedIpcPool(),
|
||||
.ipcPool = eventPool->isIpcPoolFlagSet(),
|
||||
};
|
||||
|
||||
if (eventPool->getCounterBasedFlags() != 0 && standaloneInOrderTimestampAllocationEnabled()) {
|
||||
|
||||
@@ -109,19 +109,19 @@ struct InOrderCmdListFixture : public ::Test<ModuleFixture> {
|
||||
constexpr uint32_t counterBasedFlags = (ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE | ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE);
|
||||
|
||||
const EventDescriptor eventDescriptor = {
|
||||
nullptr, // eventPoolAllocation
|
||||
pNext, // extension
|
||||
0, // totalEventSize
|
||||
EventPacketsCount::maxKernelSplit, // maxKernelCount
|
||||
0, // maxPacketsCount
|
||||
counterBasedFlags, // counterBasedFlags
|
||||
0, // index
|
||||
0, // signalScope
|
||||
0, // waitScope
|
||||
false, // timestampPool
|
||||
false, // kernelMappedTsPoolFlag
|
||||
false, // importedIpcPool
|
||||
false, // ipcPool
|
||||
.eventPoolAllocation = nullptr,
|
||||
.extensions = pNext,
|
||||
.totalEventSize = 0,
|
||||
.maxKernelCount = EventPacketsCount::maxKernelSplit,
|
||||
.maxPacketsCount = 0,
|
||||
.counterBasedFlags = counterBasedFlags,
|
||||
.index = 0,
|
||||
.signalScope = 0,
|
||||
.waitScope = 0,
|
||||
.timestampPool = false,
|
||||
.kernelMappedTsPoolFlag = false,
|
||||
.importedIpcPool = false,
|
||||
.ipcPool = false,
|
||||
};
|
||||
|
||||
standaloneCbEventStorage.push_back(1);
|
||||
|
||||
Reference in New Issue
Block a user