MCPcopy Create free account
hub / github.com/XpuOS/xsched / ZeKernelCommand

Method ZeKernelCommand

platforms/levelzero/hal/src/ze_command.cpp:43–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43ZeKernelCommand::ZeKernelCommand(ze_command_list_handle_t hCommandList, ze_kernel_handle_t hKernel, const ze_group_count_t *pLaunchFuncArgs, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)
44 : HwCommand(), hCommandList_(hCommandList), hKernel_(hKernel), hSignalEvent_(hSignalEvent), numWaitEvents_(numWaitEvents)
45{
46 size_t launch_size = sizeof(ze_group_count_t);
47 pLaunchFuncArgs_ = (ze_group_count_t *)malloc(launch_size);
48 std::memcpy(pLaunchFuncArgs_, pLaunchFuncArgs, launch_size);
49
50 size_t event_size = numWaitEvents * sizeof(ze_event_handle_t);
51 phWaitEvents_ = (ze_event_handle_t *)malloc(event_size);
52 std::memcpy(phWaitEvents_, phWaitEvents, event_size);
53
54 ze_context_handle_t context;
55 ZE_ASSERT(Driver::CommandListGetContextHandle(hCommandList_, &context));
56 event_pool_ = EventPool::Instance(context);
57}
58
59ZeKernelCommand::~ZeKernelCommand()
60{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected