mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 01:48:50 +08:00
[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:
committed by
sys_ocldev
parent
0a8c821245
commit
3595e6e046
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user