Move ClCoreHelper ownership to RootDeviceEnvironment 1/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

Use RootDeviceEnvironment getHelper<ClCoreHelper> for
- requiresNonAuxMode
- requiresAuxResolves
This commit is contained in:
Kamil Kopryk
2022-11-15 00:46:56 +00:00
committed by Compute-Runtime-Automation
parent 05aea7ebc8
commit 1d4240a0c8
19 changed files with 127 additions and 80 deletions

View File

@ -9,6 +9,8 @@
#include "shared/source/built_ins/sip.h"
#include "opencl/source/helpers/cl_hw_helper.h"
#include "gtest/gtest.h"
namespace NEO {
@ -42,6 +44,10 @@ MockDevice *ClDeviceFixture::createWithUsDeviceId(unsigned short usDeviceId) {
return MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo, rootDeviceIndex);
}
const RootDeviceEnvironment &ClDeviceFixture::getRootDeviceEnvironment() const {
return pClDevice->getRootDeviceEnvironment();
}
template <typename HelperType>
HelperType &ClDeviceFixture::getHelper() const {
auto &helper = pClDevice->getRootDeviceEnvironment().getHelper<HelperType>();
@ -50,5 +56,5 @@ HelperType &ClDeviceFixture::getHelper() const {
template ProductHelper &ClDeviceFixture::getHelper() const;
template CoreHelper &ClDeviceFixture::getHelper() const;
template ClCoreHelper &ClDeviceFixture::getHelper() const;
} // namespace NEO

View File

@ -31,6 +31,8 @@ struct ClDeviceFixture {
OsContext *osContext = nullptr;
const uint32_t rootDeviceIndex = 0u;
MockClExecutionEnvironment *pClExecutionEnvironment = nullptr;
const RootDeviceEnvironment &getRootDeviceEnvironment() const;
};
} // namespace NEO