mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add Local memory to MemoryPool
Change-Id: I908d4d99b53ed3ab959bbdc094cc1ae7bdfe2971 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
3c1bb4a3f8
commit
b1d82cd87e
@@ -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 ||
|
||||||
|
|||||||
@@ -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]));
|
||||||
|
|||||||
Reference in New Issue
Block a user