Simplify isStatusCompletedByTermination.

- remove default parameter.
- remove branch.

Change-Id: Ia829adfc684057516a2fc204e853ad3948853e22
This commit is contained in:
Mrozek, Michal
2019-07-08 18:07:46 +02:00
committed by sys_ocldev
parent 042901857f
commit baa11187c3
5 changed files with 46 additions and 16 deletions

View File

@@ -141,10 +141,11 @@ bool CommandQueue::isQueueBlocked() {
TakeOwnershipWrapper<CommandQueue> takeOwnershipWrapper(*this);
//check if we have user event and if so, if it is in blocked state.
if (this->virtualEvent) {
if (this->virtualEvent->peekExecutionStatus() <= CL_SUBMITTED) {
auto executionStatus = this->virtualEvent->peekExecutionStatus();
if (executionStatus <= CL_SUBMITTED) {
UNRECOVERABLE_IF(this->virtualEvent == nullptr);
if (this->virtualEvent->isStatusCompletedByTermination() == false) {
if (this->virtualEvent->isStatusCompletedByTermination(executionStatus) == false) {
taskCount = this->virtualEvent->peekTaskCount();
flushStamp->setStamp(this->virtualEvent->flushStamp->peekStamp());
taskLevel = this->virtualEvent->taskLevel;