Add helper function for checking kernel memory attributes

Change-Id: I1abcf5209ddc0e5ec3ecb1281d4521dcc8dbe745
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
This commit is contained in:
Raiyan Latif
2020-03-12 03:10:41 -07:00
parent 441deb1a0a
commit f8a4e67ec0
4 changed files with 9 additions and 3 deletions

View File

@@ -651,6 +651,12 @@ Kernel *Kernel::create(uint32_t productFamily, Module *module,
return function;
}
bool KernelImp::hasIndirectAllocationsAllowed() {
return (unifiedMemoryControls.indirectDeviceAllocationsAllowed ||
unifiedMemoryControls.indirectHostAllocationsAllowed ||
unifiedMemoryControls.indirectSharedAllocationsAllowed);
}
bool KernelImp::hasBarriers() {
return getImmutableData()->getDescriptor().kernelAttributes.flags.usesBarriers;
}