mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Reorganization directory structure [1/n]
Change-Id: Id1a94577437a4826a32411869f516fec20314ec0
This commit is contained in:
39
opencl/source/helpers/dispatch_info.cpp
Normal file
39
opencl/source/helpers/dispatch_info.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "helpers/dispatch_info.h"
|
||||
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
namespace NEO {
|
||||
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();
|
||||
}
|
||||
|
||||
uint32_t DispatchInfo::getRequiredPrivateScratchSize() const {
|
||||
return (kernel == nullptr) ? 0 : kernel->getPrivateScratchSize();
|
||||
}
|
||||
|
||||
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 NEO
|
||||
Reference in New Issue
Block a user