@@ -604,7 +604,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
604
604
MExtGraphDeps.reset ();
605
605
606
606
if (Graph) {
607
- MNoEventMode = false ;
607
+ MNoLastEventMode = false ;
608
608
} else {
609
609
trySwitchingToNoEventsMode ();
610
610
}
@@ -715,7 +715,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
715
715
#endif
716
716
717
717
bool trySwitchingToNoEventsMode () {
718
- if (MNoEventMode .load (std::memory_order_relaxed))
718
+ if (MNoLastEventMode .load (std::memory_order_relaxed))
719
719
return true ;
720
720
721
721
if (!MGraph.expired () || !isInOrder ())
@@ -726,7 +726,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
726
726
MDefaultGraphDeps.LastEventPtr ))
727
727
return false ;
728
728
729
- MNoEventMode .store (true , std::memory_order_relaxed);
729
+ MNoLastEventMode .store (true , std::memory_order_relaxed);
730
730
MDefaultGraphDeps.LastEventPtr = nullptr ;
731
731
return true ;
732
732
}
@@ -737,7 +737,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
737
737
assert (isInOrder ());
738
738
assert (MGraph.expired ());
739
739
assert (MDefaultGraphDeps.LastEventPtr == nullptr );
740
- assert (MNoEventMode );
740
+ assert (MNoLastEventMode );
741
741
742
742
MEmpty = false ;
743
743
@@ -762,15 +762,15 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
762
762
// Note: This could be improved by moving the handling of dependencies
763
763
// to before calling the CGF.
764
764
Handler.depends_on (EventToBuildDeps);
765
- } else if (MNoEventMode ) {
765
+ } else if (MNoLastEventMode ) {
766
766
// There might be some operations submitted to the queue
767
767
// but the LastEventPtr is not set. If we are to run a host_task,
768
768
// we need to insert a barrier to ensure proper synchronization.
769
769
Handler.depends_on (insertHelperBarrier (Handler));
770
770
}
771
771
772
772
MEmpty = false ;
773
- MNoEventMode = false ;
773
+ MNoLastEventMode = false ;
774
774
775
775
synchronizeWithExternalEvent (Handler);
776
776
@@ -785,7 +785,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
785
785
// this is handled by finalizeHandlerInOrderHostTask
786
786
assert (Handler.getType () != CGType::CodeplayHostTask);
787
787
788
- if (Handler.getType () == CGType::ExecCommandBuffer && MNoEventMode ) {
788
+ if (Handler.getType () == CGType::ExecCommandBuffer && MNoLastEventMode ) {
789
789
// TODO: this shouldn't be needed but without this
790
790
// the legacy adapter doesn't synchronize the operations properly
791
791
// when non-immediate command lists are used.
@@ -801,7 +801,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
801
801
// to before calling the CGF.
802
802
if (EventToBuildDeps && Handler.getType () != CGType::AsyncAlloc) {
803
803
// If we have last event, this means we are no longer in no-event mode.
804
- assert (!MNoEventMode );
804
+ assert (!MNoLastEventMode );
805
805
Handler.depends_on (EventToBuildDeps);
806
806
}
807
807
@@ -811,7 +811,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
811
811
812
812
EventToBuildDeps = parseEvent (Handler.finalize ());
813
813
if (EventToBuildDeps)
814
- MNoEventMode = false ;
814
+ MNoLastEventMode = false ;
815
815
816
816
// TODO: if the event is NOP we should be able to discard it.
817
817
// 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> {
1045
1045
// be true if the queue is in-order, the command graph is not
1046
1046
// associated with the queue and there has never been any host
1047
1047
// tasks submitted to the queue.
1048
- std::atomic<bool > MNoEventMode = false ;
1048
+ std::atomic<bool > MNoLastEventMode = false ;
1049
1049
1050
1050
// Used exclusively in getLastEvent and queue_empty() implementations
1051
1051
bool MEmpty = true ;
0 commit comments