Files
compute-runtime/runtime/os_interface/linux/os_context_linux.cpp
Dunajski, Bartosz 2d77b86e70 Allow Device creating multiple CSRs [5/n]
- Move Engine type to OsContext
- Move OsContext to CSR
- Improve EngineMapper logic
- CompletionStamp cleanup

Change-Id: I935cb7169c8c48cd09837e20e3da06f6dd3437b9
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-27 14:25:04 +01:00

29 lines
854 B
C++

/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/os_interface/os_context.h"
#include "runtime/os_interface/linux/drm_engine_mapper.h"
#include "runtime/os_interface/linux/drm_neo.h"
#include "runtime/os_interface/linux/os_context_linux.h"
#include "runtime/os_interface/linux/os_interface.h"
namespace OCLRT {
OsContext::OsContext(OSInterface *osInterface, uint32_t contextId, EngineInstanceT engineType)
: contextId(contextId), engineType(engineType) {
if (osInterface) {
osContextImpl = std::make_unique<OsContextLinux>(*osInterface->get()->getDrm(), engineType);
}
}
OsContext::~OsContext() = default;
OsContextLinux::OsContextImpl(Drm &drm, EngineInstanceT engineType) : drm(drm) {
engineFlag = DrmEngineMapper::engineNodeMap(engineType.type);
}
} // namespace OCLRT