21 inline namespace _V1 {
26 std::vector<sycl::detail::pi::PiEvent>
28 std::vector<sycl::detail::pi::PiEvent> Events;
29 for (
auto SyclEvent : DepEvents) {
34 if ((!SyclEventImplPtr->isContextInitialized() &&
35 !SyclEventImplPtr->is_host()) ||
36 SyclEventImplPtr->isNOP()) {
42 SyclEventImplPtr->MCommand &&
43 !
static_cast<Command *
>(SyclEventImplPtr->MCommand)->producesPiEvent();
44 if (SyclEventImplPtr->is_host() ||
45 SyclEventImplPtr->getContextImpl() != Context || NoPiEvent) {
48 SyclEventImplPtr->wait(SyclEventImplPtr);
53 if (SyclEventImplPtr->getHandleRef() ==
nullptr) {
54 std::vector<Command *> AuxCmds;
58 Events.push_back(SyclEventImplPtr->getHandleRef());
65 for (
auto SyclEvent : DepEvents) {
71 BufImpl->markAsInternal();
The Command class represents some action that needs to be performed on one or more memory objects.
void enqueueCommandForCG(EventImplPtr NewEvent, std::vector< Command * > &AuxilaryCmds, BlockingT Blocking=NON_BLOCKING)
static Scheduler & getInstance()
std::vector< sycl::detail::pi::PiEvent > getOrWaitEvents(std::vector< sycl::event > DepEvents, std::shared_ptr< sycl::detail::context_impl > Context)
std::shared_ptr< sycl::detail::context_impl > ContextImplPtr
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
void markBufferAsInternal(const std::shared_ptr< buffer_impl > &BufImpl)
void waitEvents(std::vector< sycl::event > DepEvents)
std::shared_ptr< sycl::detail::context_impl > ContextImplPtr