mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +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
@@ -54,32 +54,6 @@ class BinaryCacheFixture
|
||||
BinaryCache *cache;
|
||||
};
|
||||
|
||||
class TestedCompilerInterface : public CompilerInterface {
|
||||
public:
|
||||
static TestedCompilerInterface *getInstance() {
|
||||
if (pInstance == nullptr) {
|
||||
auto instance = new TestedCompilerInterface();
|
||||
|
||||
if (!instance->initialize()) {
|
||||
delete instance;
|
||||
instance = nullptr;
|
||||
}
|
||||
|
||||
pInstance = instance;
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
static void shutdown() {
|
||||
if (pInstance) {
|
||||
delete pInstance;
|
||||
pInstance = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
static TestedCompilerInterface *pInstance;
|
||||
};
|
||||
TestedCompilerInterface *TestedCompilerInterface::pInstance = nullptr;
|
||||
|
||||
class BinaryCacheMock : public BinaryCache {
|
||||
public:
|
||||
BinaryCacheMock() {
|
||||
@@ -103,12 +77,11 @@ class CompilerInterfaceCachedFixture : public DeviceFixture {
|
||||
public:
|
||||
void SetUp() {
|
||||
DeviceFixture::SetUp();
|
||||
pCompilerInterface = TestedCompilerInterface::getInstance();
|
||||
pCompilerInterface = pDevice->getExecutionEnvironment()->getCompilerInterface();
|
||||
ASSERT_NE(pCompilerInterface, nullptr);
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
TestedCompilerInterface::shutdown();
|
||||
DeviceFixture::TearDown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user