Files
compute-runtime/shared/source/unified_memory/unified_memory.cpp
Mateusz Jablonski 7df9945ebe Add absolute include paths
Change-Id: I67a6919bbbff1d30c7d6cdb257b41c87bad51e7f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-23 23:49:12 +01:00

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;
}