[8/n] Unified Shared Memory.

-Wire in host allocations API.

Related-To: NEO-3148

Change-Id: If7213a7c90a35aebb530e2b4d14413138cd84297
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
Mrozek, Michal
2019-06-19 12:14:43 +02:00
committed by sys_ocldev
parent 0a8c821245
commit 3595e6e046
2 changed files with 36 additions and 6 deletions

View File

@@ -3363,9 +3363,19 @@ void *clHostMemAllocINTEL(
size_t size,
cl_uint alignment,
cl_int *errcodeRet) {
cl_int retVal = CL_OUT_OF_HOST_MEMORY;
*errcodeRet = retVal;
return nullptr;
Context *neoContext = nullptr;
ErrorCodeHelper err(errcodeRet, CL_SUCCESS);
auto retVal = validateObjects(WithCastToInternal(context, &neoContext));
if (retVal != CL_SUCCESS) {
err.set(retVal);
return nullptr;
}
return neoContext->getSVMAllocsManager()->createUnifiedMemoryAllocation(size, SVMAllocsManager::UnifiedMemoryProperties(InternalMemoryType::HOST_UNIFIED_MEMORY));
}
void *clDeviceMemAllocINTEL(