2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2022-02-22 20:51:29 +08:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "event.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
class CommandQueue;
|
|
|
|
class Context;
|
|
|
|
|
|
|
|
class UserEvent : public Event {
|
|
|
|
public:
|
|
|
|
UserEvent(Context *ctx = nullptr);
|
|
|
|
|
|
|
|
~UserEvent() override = default;
|
|
|
|
|
2022-02-22 20:51:29 +08:00
|
|
|
WaitStatus wait(bool blocking, bool useQuickKmdSleep) override;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
void updateExecutionStatus() override;
|
|
|
|
|
2022-11-22 21:53:59 +08:00
|
|
|
TaskCountType getTaskLevel() override;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
bool isInitialEventStatus() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
class VirtualEvent : public Event {
|
|
|
|
public:
|
|
|
|
VirtualEvent(CommandQueue *cmdQ = nullptr, Context *ctx = nullptr);
|
|
|
|
|
|
|
|
~VirtualEvent() override = default;
|
|
|
|
|
2022-02-22 20:51:29 +08:00
|
|
|
WaitStatus wait(bool blocking, bool useQuickKmdSleep) override;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
bool setStatus(cl_int status) override;
|
|
|
|
|
|
|
|
void updateExecutionStatus() override;
|
|
|
|
|
2022-11-22 21:53:59 +08:00
|
|
|
TaskCountType getTaskLevel() override;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|