Files
compute-runtime/shared/source/helpers/cache_policy.cpp
Compute-Runtime-Validation b3078cfbae Revert "Change DG2 l1 cache policy to WB"
This reverts commit 9a5e619c42.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-07-28 07:27:13 +02:00

25 lines
641 B
C++

/*
* Copyright (C) 2018-2022 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