mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
Include files are now grouped and sorted in following order: 1. Header file of the class the current file implements 2. Project files 3. Third party files 4. Standard library Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
36 lines
948 B
C++
36 lines
948 B
C++
/*
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/helpers/dispatch_info.h"
|
|
|
|
#include "runtime/kernel/kernel.h"
|
|
|
|
namespace OCLRT {
|
|
bool DispatchInfo::usesSlm() const {
|
|
return (kernel == nullptr) ? false : kernel->slmTotalSize > 0;
|
|
}
|
|
|
|
bool DispatchInfo::usesStatelessPrintfSurface() const {
|
|
return (kernel == nullptr) ? false : (kernel->getKernelInfo().patchInfo.pAllocateStatelessPrintfSurface != nullptr);
|
|
}
|
|
|
|
uint32_t DispatchInfo::getRequiredScratchSize() const {
|
|
return (kernel == nullptr) ? 0 : kernel->getScratchSize();
|
|
}
|
|
|
|
Kernel *MultiDispatchInfo::peekMainKernel() const {
|
|
if (dispatchInfos.size() == 0) {
|
|
return nullptr;
|
|
}
|
|
return mainKernel ? mainKernel : dispatchInfos.begin()->getKernel();
|
|
}
|
|
|
|
Kernel *MultiDispatchInfo::peekParentKernel() const {
|
|
return (mainKernel && mainKernel->isParentKernel) ? mainKernel : nullptr;
|
|
}
|
|
} // namespace OCLRT
|