mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Move CompilerInterface to ExecutionEnvironment
Change-Id: I14afdd8fc41ecd4ac8c8fcbeecda2539bc847288 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
931b462ee1
commit
d2759a0629
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/command_stream/command_stream_receiver.h"
|
||||
#include "runtime/compiler_interface/compiler_interface.h"
|
||||
#include "runtime/source_level_debugger/source_level_debugger.h"
|
||||
#include "runtime/built_ins/sip.h"
|
||||
#include "runtime/gmm_helper/gmm_helper.h"
|
||||
@@ -76,4 +77,13 @@ void ExecutionEnvironment::initSourceLevelDebugger(const HardwareInfo &hwInfo) {
|
||||
GmmHelper *ExecutionEnvironment::getGmmHelper() const {
|
||||
return gmmHelper.get();
|
||||
}
|
||||
CompilerInterface *ExecutionEnvironment::getCompilerInterface() {
|
||||
if (this->compilerInterface.get() == nullptr) {
|
||||
std::lock_guard<std::mutex> autolock(this->mtx);
|
||||
if (this->compilerInterface.get() == nullptr) {
|
||||
this->compilerInterface.reset(CompilerInterface::createInstance());
|
||||
}
|
||||
}
|
||||
return this->compilerInterface.get();
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user