mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
- remove one constructor - start using mock graphics allocation in tests Change-Id: Idb8f4a35dbc2cae8d6bf667bab5542d8e91d6e0d
26 lines
613 B
C++
26 lines
613 B
C++
/*
|
|
* Copyright (C) 2017-2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "runtime/memory_manager/graphics_allocation.h"
|
|
|
|
namespace OCLRT {
|
|
class MockGraphicsAllocation : public GraphicsAllocation {
|
|
using GraphicsAllocation::GraphicsAllocation;
|
|
|
|
public:
|
|
MockGraphicsAllocation(void *buffer, size_t sizeIn) : GraphicsAllocation(buffer, castToUint64(buffer), 0llu, sizeIn) {
|
|
}
|
|
void resetInspectionId() {
|
|
this->inspectionId = 0;
|
|
}
|
|
void overrideMemoryPool(MemoryPool::Type pool) {
|
|
this->memoryPool = pool;
|
|
}
|
|
};
|
|
} // namespace OCLRT
|