2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2018-09-18 09:11:08 +02:00
|
|
|
* Copyright (C) 2017-2018 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "graphics_allocation.h"
|
|
|
|
|
#include "runtime/helpers/aligned_memory.h"
|
|
|
|
|
|
|
|
|
|
bool OCLRT::GraphicsAllocation::isL3Capable() {
|
2018-08-24 15:23:45 +02:00
|
|
|
auto ptr = ptrOffset(cpuPtr, static_cast<size_t>(this->allocationOffset));
|
|
|
|
|
if (alignUp(ptr, MemoryConstants::cacheLineSize) == ptr && alignUp(this->size, MemoryConstants::cacheLineSize) == this->size) {
|
2017-12-21 00:45:38 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|