Files
compute-runtime/opencl/source/helpers/cache_policy.cpp
kamdiedrich fa8e720f9e Reorganization directory structure [1/n]
Change-Id: Id1a94577437a4826a32411869f516fec20314ec0
2020-02-22 21:56:09 +01:00

25 lines
614 B
C++

/*
* Copyright (C) 2017-2020 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