Debian Codegraph @

shared/test/common/helpers/raii_product_helper.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2021-2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #pragma once
9
10 #include "shared/source/execution_environment/root_device_environment.h"cxx . . $ `<file>/shared/source/execution_environment/root_device_environment.h`/
11 #include "shared/source/helpers/hw_info.h"cxx . . $ `<file>/shared/source/helpers/hw_info.h`/
12 #include "shared/source/os_interface/product_helper.h"cxx . . $ `<file>/shared/source/os_interface/product_helper.h`/
13
14 namespace NEOcxx . . $ NEO/ {
15 extern ProductHelperCreateFunctionTypecxx . . $ NEO/ProductHelperCreateFunctionType# productHelperFactorycxx . . $ NEO/productHelperFactory.[IGFX_MAX_PRODUCTcxx . . $ IGFX_MAX_PRODUCT.];
16
17 template <typename MockProductHelper>
18 class RAIIProductHelperFactorycxx . . $ NEO/RAIIProductHelperFactory# {
19 public:
20 PRODUCT_FAMILYcxx . . $ PRODUCT_FAMILY# productFamilycxx . . $ NEO/RAIIProductHelperFactory#productFamily.;
21
22 ProductHelperCreateFunctionTypecxx . . $ NEO/ProductHelperCreateFunctionType# createProductHelpercxx . . $ NEO/RAIIProductHelperFactory#createProductHelper.;
23 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<ProductHelpercxx . . $ NEO/ProductHelper#> productHelperBackupcxx . . $ NEO/RAIIProductHelperFactory#productHelperBackup.;
24 MockProductHelper *mockProductHelpercxx . . $ NEO/RAIIProductHelperFactory#mockProductHelper.;
25 RootDeviceEnvironmentcxx . . $ NEO/RootDeviceEnvironment# &rootDeviceEnvironmentcxx . . $ NEO/RAIIProductHelperFactory#rootDeviceEnvironment.;
26
27 static stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<ProductHelpercxx . . $ NEO/ProductHelper#> createcxx . . $ NEO/RAIIProductHelperFactory#create(2f6d0d5a690d0af2).() {
28
29 return stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<ProductHelpercxx . . $ NEO/ProductHelper#>(new MockProductHelper());
30 }
31
32 ProductHelperCreateFunctionTypecxx . . $ NEO/ProductHelperCreateFunctionType# createMockProductHelpercxx . . $ NEO/RAIIProductHelperFactory#createMockProductHelper. = createcxx . . $ NEO/RAIIProductHelperFactory#create(2f6d0d5a690d0af2).;
33
34 RAIIProductHelperFactorycxx . . $ NEO/RAIIProductHelperFactory#`RAIIProductHelperFactory<MockProductHelper>`(37e18af22b6efc52).(RootDeviceEnvironmentcxx . . $ NEO/RootDeviceEnvironment# &rootDeviceEnvironment) : rootDeviceEnvironmentcxx . . $ NEO/RAIIProductHelperFactory#rootDeviceEnvironment.(rootDeviceEnvironment) {
35
36 this->productFamilycxx . . $ NEO/RAIIProductHelperFactory#productFamily. = rootDeviceEnvironment.getHardwareInfocxx . . $ NEO/RootDeviceEnvironment#getHardwareInfo(4b81c7ce9ed692ba).()->platformcxx . . $ NEO/HardwareInfo#platform..eProductFamilycxx . . $ PLATFORM_STR#eProductFamily.;
37 createProductHelpercxx . . $ NEO/RAIIProductHelperFactory#createProductHelper. = productHelperFactorycxx . . $ NEO/productHelperFactory.[productFamilycxx . . $ NEO/RAIIProductHelperFactory#productFamily.];
38 productHelperFactorycxx . . $ NEO/productHelperFactory.[productFamilycxx . . $ NEO/RAIIProductHelperFactory#productFamily.] = createMockProductHelpercxx . . $ NEO/RAIIProductHelperFactory#createMockProductHelper.;
39 productHelperBackupcxx . . $ NEO/RAIIProductHelperFactory#productHelperBackup. =cxx . . $ std/unique_ptr#`operator=`(1b63e42eaa758a73). createMockProductHelpercxx . . $ NEO/RAIIProductHelperFactory#createMockProductHelper.();
40 rootDeviceEnvironment.productHelpercxx . . $ NEO/RootDeviceEnvironment#productHelper..swapcxx . . $ std/unique_ptr#swap(8b507b1a87794de5).(productHelperBackupcxx . . $ NEO/RAIIProductHelperFactory#productHelperBackup.);
41 mockProductHelpercxx . . $ NEO/RAIIProductHelperFactory#mockProductHelper. = static_cast<MockProductHelper *>(rootDeviceEnvironment.productHelpercxx . . $ NEO/RootDeviceEnvironment#productHelper..getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).());
42 }
43
44 ~cxx . . $ NEO/RAIIProductHelperFactory#`~RAIIProductHelperFactory<MockProductHelper>`(49f6e7a06ebc5aa8).RAIIProductHelperFactory() {
45 productHelperFactorycxx . . $ NEO/productHelperFactory.[productFamilycxx . . $ NEO/RAIIProductHelperFactory#productFamily.] = createProductHelpercxx . . $ NEO/RAIIProductHelperFactory#createProductHelper.;
46 rootDeviceEnvironmentcxx . . $ NEO/RAIIProductHelperFactory#rootDeviceEnvironment..productHelpercxx . . $ NEO/RootDeviceEnvironment#productHelper..swapcxx . . $ std/unique_ptr#swap(8b507b1a87794de5).(productHelperBackupcxx . . $ NEO/RAIIProductHelperFactory#productHelperBackup.);
47 }
48 };
49 } // namespace NEO