Files
compute-runtime/core/helpers/cache_policy.cpp
Dunajski, Bartosz 614156dd8b Move cache_policy to core
Change-Id: I16be70d15f329117539fe6dfcc07c6dc10d54977
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-12-03 14:53:49 +01:00

25 lines
614 B
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/helpers/cache_policy.h"
#include "core/helpers/aligned_memory.h"
#include "core/memory_manager/graphics_allocation.h"
namespace NEO {
bool isL3Capable(void *ptr, size_t size) {
return isAligned<MemoryConstants::cacheLineSize>(ptr) &&
isAligned<MemoryConstants::cacheLineSize>(size);
}
bool isL3Capable(const NEO::GraphicsAllocation &graphicsAllocation) {
return isL3Capable(graphicsAllocation.getUnderlyingBuffer(), graphicsAllocation.getUnderlyingBufferSize());
}
} // namespace NEO