Add Local memory to MemoryPool

Change-Id: I908d4d99b53ed3ab959bbdc094cc1ae7bdfe2971
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2019-03-18 14:53:06 +01:00
committed by sys_ocldev
parent 3c1bb4a3f8
commit b1d82cd87e
2 changed files with 4 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ constexpr Type System64KBPages{2};
constexpr Type System4KBPagesWith32BitGpuAddressing{3}; constexpr Type System4KBPagesWith32BitGpuAddressing{3};
constexpr Type System64KBPagesWith32BitGpuAddressing{4}; constexpr Type System64KBPagesWith32BitGpuAddressing{4};
constexpr Type SystemCpuInaccessible{5}; constexpr Type SystemCpuInaccessible{5};
constexpr Type LocalMemory{6};
inline bool isSystemMemoryPool(Type pool) { inline bool isSystemMemoryPool(Type pool) {
return pool == System4KBPages || return pool == System4KBPages ||

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Intel Corporation * Copyright (C) 2018-2019 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -25,7 +25,8 @@ TEST(MemoryPool, givenSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenTru
TEST(MemoryPool, givenNonSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenFalseIsReturned) { TEST(MemoryPool, givenNonSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenFalseIsReturned) {
MemoryPool::Type memoryTypes[] = {MemoryPool::MemoryNull, MemoryPool::Type memoryTypes[] = {MemoryPool::MemoryNull,
MemoryPool::SystemCpuInaccessible}; MemoryPool::SystemCpuInaccessible,
MemoryPool::LocalMemory};
for (size_t i = 0; i < arrayCount(memoryTypes); i++) { for (size_t i = 0; i < arrayCount(memoryTypes); i++) {
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(memoryTypes[i])); EXPECT_FALSE(MemoryPool::isSystemMemoryPool(memoryTypes[i]));