Files
compute-runtime/unit_tests/mocks/mock_context.h
Filip Hazubski 8b57d28116 clang-format: enable sorting includes
Include files are now grouped and sorted in following order:
1. Header file of the class the current file implements
2. Project files
3. Third party files
4. Standard library

Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-02-27 11:50:07 +01:00

46 lines
1.2 KiB
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/context/context.h"
#include "runtime/sharings/sharing_factory.h"
#include <memory>
namespace OCLRT {
class MockContext : public Context {
public:
using Context::sharingFunctions;
MockContext(Device *device, bool noSpecialQueue = false);
MockContext(
void(CL_CALLBACK *funcNotify)(const char *, const void *, size_t, void *),
void *data);
MockContext();
~MockContext();
void setMemoryManager(MemoryManager *mm) {
memoryManager = mm;
}
void clearSharingFunctions();
void setSharingFunctions(SharingFunctions *sharingFunctions);
void setContextType(ContextType contextType);
void releaseSharingFunctions(SharingType sharing);
void resetSharingFunctions(SharingType sharing);
void registerSharingWithId(SharingFunctions *sharing, SharingType sharingId);
cl_bool peekPreferD3dSharedResources() { return preferD3dSharedResources; }
void forcePreferD3dSharedResources(cl_bool value) { preferD3dSharedResources = value; }
DriverDiagnostics *getDriverDiagnostics() { return this->driverDiagnostics; }
private:
Device *device;
};
} // namespace OCLRT