mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Change-Id: I67a6919bbbff1d30c7d6cdb257b41c87bad51e7f Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
24 lines
623 B
C++
24 lines
623 B
C++
/*
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/unified_memory/unified_memory.h"
|
|
|
|
uint32_t UnifiedMemoryControls::generateMask() {
|
|
uint32_t resourceMask = 0u;
|
|
if (this->indirectHostAllocationsAllowed) {
|
|
resourceMask |= InternalMemoryType::HOST_UNIFIED_MEMORY;
|
|
}
|
|
if (this->indirectDeviceAllocationsAllowed) {
|
|
resourceMask |= InternalMemoryType::DEVICE_UNIFIED_MEMORY;
|
|
}
|
|
if (this->indirectSharedAllocationsAllowed) {
|
|
resourceMask |= InternalMemoryType::SHARED_UNIFIED_MEMORY;
|
|
}
|
|
|
|
return resourceMask;
|
|
}
|