Move files between shared/test/unit_test and /common (fixtures, helpers, mocks)

unit_test/fixtures/mock_aub_center_fixture.h -> common/fixtures
unit_test/helpers/raii_hw_helper.h -> common/helpers
unit_test/helpers/static_size3.h -> common/helpers
unit_test/helpers/ult_limits.h -> common/helpers
unit_test/memory_manager/mock_prefetch_manager.h -> common/memory_manager
common/mocks/mock_aub_stream.h -> unit_test/mocks
common/mocks/mock_csr_simulated_common_hw.h -> unit_test/mocks
common/mocks/mock_direct_submission_diagnostic_collector.h -> unit_test/mocks
common/mocks/mock_lrca_helper.h -> unit_test/mocks
common/mocks/mock_tbx_stream.h -> unit_test/mocks
common/mocks/linux/mock_os_context_linux.h -> unit_test/mocks/linux
common/mocks/windows/mock_wddm_direct_submission.h -> unit_test/mocks/windows

Related-To: NEO-6524
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
This commit is contained in:
Warchulski, Jaroslaw
2022-08-10 17:00:50 +00:00
committed by Compute-Runtime-Automation
parent 0ecc08337e
commit aed890a219
66 changed files with 82 additions and 82 deletions

View File

@@ -8,6 +8,9 @@ target_sources(neo_libult_common PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator.h
${CMAKE_CURRENT_SOURCE_DIR}/gtest_helpers.h
${CMAKE_CURRENT_SOURCE_DIR}/raii_hw_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/static_size3.h
${CMAKE_CURRENT_SOURCE_DIR}/ult_limits.h
)
add_subdirectories()

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/hw_helper.h"
namespace NEO {
extern HwHelper *hwHelperFactory[IGFX_MAX_CORE];
template <class MockHelper>
class RAIIHwHelperFactory {
public:
GFXCORE_FAMILY gfxCoreFamily;
HwHelper *hwHelper;
MockHelper mockHwHelper;
RAIIHwHelperFactory(GFXCORE_FAMILY gfxCoreFamily) {
this->gfxCoreFamily = gfxCoreFamily;
hwHelper = hwHelperFactory[this->gfxCoreFamily];
hwHelperFactory[this->gfxCoreFamily] = &mockHwHelper;
}
~RAIIHwHelperFactory() {
hwHelperFactory[this->gfxCoreFamily] = hwHelper;
}
};
} // namespace NEO

View File

@@ -0,0 +1,16 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
template <size_t X, size_t Y, size_t Z>
struct StatickSize3 {
operator const size_t *() {
static const size_t v[] = {X, Y, Z};
return v;
}
};

View File

@@ -0,0 +1,13 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstdint>
namespace NEO {
constexpr uint32_t maxRootDeviceCount = 3u;
} // namespace NEO