Files
compute-runtime/opencl/source/command_queue/finish.h
Maciej Dziuban 6d1e048327 Rename an overload of waitUntilComplete to waitForAllEngines
- Overloaded functions were quite different, they should have different names
- waitForLatestTaskCount function was redundant and hence its body was moved
inside waitForAllEngines

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-09-23 09:43:11 +02:00

28 lines
603 B
C++

/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/command_stream/command_stream_receiver.h"
#include "opencl/source/command_queue/command_queue_hw.h"
namespace NEO {
template <typename GfxFamily>
cl_int CommandQueueHw<GfxFamily>::finish() {
auto result = getGpgpuCommandStreamReceiver().flushBatchedSubmissions();
if (!result) {
return CL_OUT_OF_RESOURCES;
}
// Stall until HW reaches taskCount on all its engines
waitForAllEngines(true, nullptr);
return CL_SUCCESS;
}
} // namespace NEO