@@ -604,7 +604,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
604604 MExtGraphDeps.reset ();
605605
606606 if (Graph) {
607- MNoEventMode = false ;
607+ MNoLastEventMode = false ;
608608 } else {
609609 trySwitchingToNoEventsMode ();
610610 }
@@ -715,7 +715,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
715715#endif
716716
717717 bool trySwitchingToNoEventsMode () {
718- if (MNoEventMode .load (std::memory_order_relaxed))
718+ if (MNoLastEventMode .load (std::memory_order_relaxed))
719719 return true ;
720720
721721 if (!MGraph.expired () || !isInOrder ())
@@ -726,7 +726,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
726726 MDefaultGraphDeps.LastEventPtr ))
727727 return false ;
728728
729- MNoEventMode .store (true , std::memory_order_relaxed);
729+ MNoLastEventMode .store (true , std::memory_order_relaxed);
730730 MDefaultGraphDeps.LastEventPtr = nullptr ;
731731 return true ;
732732 }
@@ -737,7 +737,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
737737 assert (isInOrder ());
738738 assert (MGraph.expired ());
739739 assert (MDefaultGraphDeps.LastEventPtr == nullptr );
740- assert (MNoEventMode );
740+ assert (MNoLastEventMode );
741741
742742 MEmpty = false ;
743743
@@ -762,15 +762,15 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
762762 // Note: This could be improved by moving the handling of dependencies
763763 // to before calling the CGF.
764764 Handler.depends_on (EventToBuildDeps);
765- } else if (MNoEventMode ) {
765+ } else if (MNoLastEventMode ) {
766766 // There might be some operations submitted to the queue
767767 // but the LastEventPtr is not set. If we are to run a host_task,
768768 // we need to insert a barrier to ensure proper synchronization.
769769 Handler.depends_on (insertHelperBarrier (Handler));
770770 }
771771
772772 MEmpty = false ;
773- MNoEventMode = false ;
773+ MNoLastEventMode = false ;
774774
775775 synchronizeWithExternalEvent (Handler);
776776
@@ -785,7 +785,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
785785 // this is handled by finalizeHandlerInOrderHostTask
786786 assert (Handler.getType () != CGType::CodeplayHostTask);
787787
788- if (Handler.getType () == CGType::ExecCommandBuffer && MNoEventMode ) {
788+ if (Handler.getType () == CGType::ExecCommandBuffer && MNoLastEventMode ) {
789789 // TODO: this shouldn't be needed but without this
790790 // the legacy adapter doesn't synchronize the operations properly
791791 // when non-immediate command lists are used.
@@ -801,7 +801,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
801801 // to before calling the CGF.
802802 if (EventToBuildDeps && Handler.getType () != CGType::AsyncAlloc) {
803803 // If we have last event, this means we are no longer in no-event mode.
804- assert (!MNoEventMode );
804+ assert (!MNoLastEventMode );
805805 Handler.depends_on (EventToBuildDeps);
806806 }
807807
@@ -811,7 +811,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
811811
812812 EventToBuildDeps = parseEvent (Handler.finalize ());
813813 if (EventToBuildDeps)
814- MNoEventMode = false ;
814+ MNoLastEventMode = false ;
815815
816816 // TODO: if the event is NOP we should be able to discard it.
817817 // However, NOP events are used to describe ordering for graph operations
@@ -1045,7 +1045,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
10451045 // be true if the queue is in-order, the command graph is not
10461046 // associated with the queue and there has never been any host
10471047 // tasks submitted to the queue.
1048- std::atomic<bool > MNoEventMode = false ;
1048+ std::atomic<bool > MNoLastEventMode = false ;
10491049
10501050 // Used exclusively in getLastEvent and queue_empty() implementations
10511051 bool MEmpty = true ;
0 commit comments