Files
compute-runtime/shared/source/helpers/cache_policy.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

25 lines
641 B
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/cache_policy.h"
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/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