From 686209874a8cc23b99cd154b3bb5cf5be6f9b4ab Mon Sep 17 00:00:00 2001 From: "Mrozek, Michal" Date: Tue, 26 Jun 2018 10:51:01 +0200 Subject: [PATCH] Remove not used parameters in PlatformFixture SetUp function Change-Id: Ib58c97e377218350cea19373dd1f193c4cc32a45 --- unit_tests/api/cl_api_tests.cpp | 2 +- unit_tests/api/cl_get_platform_info_tests.cpp | 4 ++-- unit_tests/context/context_get_info_tests.cpp | 2 +- unit_tests/context/context_tests.cpp | 2 +- unit_tests/context/driver_diagnostics_tests.h | 2 +- unit_tests/context/get_supported_image_formats_tests.cpp | 4 ++-- unit_tests/d3d_sharing/d3d9_tests.cpp | 2 +- unit_tests/d3d_sharing/d3d_tests.cpp | 2 +- unit_tests/fixtures/execution_model_kernel_fixture.h | 4 ++-- unit_tests/fixtures/platform_fixture.cpp | 2 +- unit_tests/fixtures/platform_fixture.h | 2 +- unit_tests/fixtures/scenario_test_fixture.h | 2 +- unit_tests/gen10/test_platform_caps_gen10.cpp | 2 +- unit_tests/gen8/test_platform_caps_gen8.cpp | 2 +- unit_tests/gen9/test_platform_caps_gen9.cpp | 2 +- unit_tests/kernel/kernel_reflection_surface_tests.cpp | 6 +++--- unit_tests/mem_obj/buffer_tests.cpp | 2 +- unit_tests/mem_obj/get_mem_object_info_tests.cpp | 2 +- unit_tests/os_interface/hw_info_config_tests.cpp | 2 +- unit_tests/preamble/preamble_fixture.h | 4 ++-- unit_tests/program/program_data_tests.cpp | 4 ++-- unit_tests/program/program_nonuniform.cpp | 2 +- unit_tests/program/program_with_block_kernels_tests.cpp | 2 +- unit_tests/program/program_with_source.h | 4 ++-- unit_tests/sharings/va/context_va_tests.cpp | 4 ++-- unit_tests/sharings/va/va_sharing_tests.cpp | 2 +- 26 files changed, 35 insertions(+), 35 deletions(-) diff --git a/unit_tests/api/cl_api_tests.cpp b/unit_tests/api/cl_api_tests.cpp index e7411dc21b..0a423e1ed4 100644 --- a/unit_tests/api/cl_api_tests.cpp +++ b/unit_tests/api/cl_api_tests.cpp @@ -36,7 +36,7 @@ api_fixture::api_fixture() } void api_fixture::SetUp() { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); ASSERT_EQ(retVal, CL_SUCCESS); auto pDevice = pPlatform->getDevice(0); diff --git a/unit_tests/api/cl_get_platform_info_tests.cpp b/unit_tests/api/cl_get_platform_info_tests.cpp index d2e875c176..c362874a55 100644 --- a/unit_tests/api/cl_get_platform_info_tests.cpp +++ b/unit_tests/api/cl_get_platform_info_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -190,7 +190,7 @@ class GetPlatformInfoTests : public PlatformFixture, protected: void SetUp() override { platformInfo = GetParam(); - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); } void TearDown() override { diff --git a/unit_tests/context/context_get_info_tests.cpp b/unit_tests/context/context_get_info_tests.cpp index 62ce360f25..e5c68eaac7 100644 --- a/unit_tests/context/context_get_info_tests.cpp +++ b/unit_tests/context/context_get_info_tests.cpp @@ -39,7 +39,7 @@ struct ContextGetInfoTest : public PlatformFixture, } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); ContextFixture::SetUp(num_devices, devices); } diff --git a/unit_tests/context/context_tests.cpp b/unit_tests/context/context_tests.cpp index c443680855..d1780c64c7 100644 --- a/unit_tests/context/context_tests.cpp +++ b/unit_tests/context/context_tests.cpp @@ -62,7 +62,7 @@ struct ContextTest : public PlatformFixture, } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); cl_platform_id platform = pPlatform; properties = new cl_context_properties[3]; diff --git a/unit_tests/context/driver_diagnostics_tests.h b/unit_tests/context/driver_diagnostics_tests.h index 84e7dfa6a8..cbf98d2e4b 100644 --- a/unit_tests/context/driver_diagnostics_tests.h +++ b/unit_tests/context/driver_diagnostics_tests.h @@ -51,7 +51,7 @@ struct DriverDiagnosticsTest : public PlatformFixture, } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); memset(userData, 0, maxHintCounter * DriverDiagnostics::maxHintStringSize); } diff --git a/unit_tests/context/get_supported_image_formats_tests.cpp b/unit_tests/context/get_supported_image_formats_tests.cpp index f28512249e..51a68971e1 100644 --- a/unit_tests/context/get_supported_image_formats_tests.cpp +++ b/unit_tests/context/get_supported_image_formats_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -44,7 +44,7 @@ struct GetSupportedImageFormatsTest : public PlatformFixture, } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); ContextFixture::SetUp(num_devices, devices); } diff --git a/unit_tests/d3d_sharing/d3d9_tests.cpp b/unit_tests/d3d_sharing/d3d9_tests.cpp index 3cbb8741b1..516cee07a2 100644 --- a/unit_tests/d3d_sharing/d3d9_tests.cpp +++ b/unit_tests/d3d_sharing/d3d9_tests.cpp @@ -91,7 +91,7 @@ class D3D9Tests : public PlatformFixture, public ::testing::Test { void SetUp() override { dbgRestore = new DebugManagerStateRestore(); - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); context = new MockContext(pPlatform->getDevice(0)); context->forcePreferD3dSharedResources(true); context->setMemoryManager(&mockMM); diff --git a/unit_tests/d3d_sharing/d3d_tests.cpp b/unit_tests/d3d_sharing/d3d_tests.cpp index 7257bc38ef..52171b1c75 100644 --- a/unit_tests/d3d_sharing/d3d_tests.cpp +++ b/unit_tests/d3d_sharing/d3d_tests.cpp @@ -108,7 +108,7 @@ class D3DTests : public PlatformFixture, public ::testing::Test { void SetUp() override { dbgRestore = new DebugManagerStateRestore(); - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); context = new MockContext(pPlatform->getDevice(0)); context->forcePreferD3dSharedResources(true); diff --git a/unit_tests/fixtures/execution_model_kernel_fixture.h b/unit_tests/fixtures/execution_model_kernel_fixture.h index 2a313c33ce..a0e5dfe0bf 100644 --- a/unit_tests/fixtures/execution_model_kernel_fixture.h +++ b/unit_tests/fixtures/execution_model_kernel_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -42,7 +42,7 @@ class ExecutionModelKernelFixture : public ProgramFromBinaryTest, protected: void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); std::string temp; temp.assign(pPlatform->getDevice(0)->getDeviceInfo().clVersion); diff --git a/unit_tests/fixtures/platform_fixture.cpp b/unit_tests/fixtures/platform_fixture.cpp index 97436029c0..a677de0659 100644 --- a/unit_tests/fixtures/platform_fixture.cpp +++ b/unit_tests/fixtures/platform_fixture.cpp @@ -32,7 +32,7 @@ PlatformFixture::PlatformFixture() : pPlatform(nullptr), num_devices(0), devices(nullptr) { } -void PlatformFixture::SetUp(size_t numDevices, const HardwareInfo **pDevices) { +void PlatformFixture::SetUp() { pPlatform = platform(); ASSERT_EQ(0u, pPlatform->getNumDevices()); diff --git a/unit_tests/fixtures/platform_fixture.h b/unit_tests/fixtures/platform_fixture.h index a719d897f0..ef2e29bdcc 100644 --- a/unit_tests/fixtures/platform_fixture.h +++ b/unit_tests/fixtures/platform_fixture.h @@ -33,7 +33,7 @@ class PlatformFixture { PlatformFixture(); protected: - void SetUp(size_t numDevices, const HardwareInfo **pDevices); + void SetUp(); void TearDown(); Platform *pPlatform; diff --git a/unit_tests/fixtures/scenario_test_fixture.h b/unit_tests/fixtures/scenario_test_fixture.h index b76da10d50..88281751cc 100644 --- a/unit_tests/fixtures/scenario_test_fixture.h +++ b/unit_tests/fixtures/scenario_test_fixture.h @@ -41,7 +41,7 @@ class ScenarioTest : public ::testing::Test, protected: void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); auto pDevice = pPlatform->getDevice(0); ASSERT_NE(nullptr, pDevice); diff --git a/unit_tests/gen10/test_platform_caps_gen10.cpp b/unit_tests/gen10/test_platform_caps_gen10.cpp index c3e6edb02f..cd1ec037fe 100644 --- a/unit_tests/gen10/test_platform_caps_gen10.cpp +++ b/unit_tests/gen10/test_platform_caps_gen10.cpp @@ -28,7 +28,7 @@ using namespace OCLRT; struct Gen10PlatformCaps : public PlatformFixture, public ::testing::Test { void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); } void TearDown() override { diff --git a/unit_tests/gen8/test_platform_caps_gen8.cpp b/unit_tests/gen8/test_platform_caps_gen8.cpp index ab6446d659..5230ee6269 100644 --- a/unit_tests/gen8/test_platform_caps_gen8.cpp +++ b/unit_tests/gen8/test_platform_caps_gen8.cpp @@ -28,7 +28,7 @@ using namespace OCLRT; struct Gen8PlatformCaps : public PlatformFixture, public ::testing::Test { void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); } void TearDown() override { diff --git a/unit_tests/gen9/test_platform_caps_gen9.cpp b/unit_tests/gen9/test_platform_caps_gen9.cpp index 37eada44f7..331aa4f75f 100644 --- a/unit_tests/gen9/test_platform_caps_gen9.cpp +++ b/unit_tests/gen9/test_platform_caps_gen9.cpp @@ -29,7 +29,7 @@ using namespace OCLRT; struct Gen9PlatformCaps : public PlatformFixture, public ::testing::Test { void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); } void TearDown() override { diff --git a/unit_tests/kernel/kernel_reflection_surface_tests.cpp b/unit_tests/kernel/kernel_reflection_surface_tests.cpp index 812a9f5652..c5766b78f7 100644 --- a/unit_tests/kernel/kernel_reflection_surface_tests.cpp +++ b/unit_tests/kernel/kernel_reflection_surface_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1248,7 +1248,7 @@ class ReflectionSurfaceHelperFixture : public PlatformFixture, public ::testing: } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); } void TearDown() override { @@ -1264,7 +1264,7 @@ class ReflectionSurfaceHelperSetKernelDataTest : public testing::TestWithParamgetDevice(0); diff --git a/unit_tests/mem_obj/get_mem_object_info_tests.cpp b/unit_tests/mem_obj/get_mem_object_info_tests.cpp index 56ac3be948..81614b13c6 100644 --- a/unit_tests/mem_obj/get_mem_object_info_tests.cpp +++ b/unit_tests/mem_obj/get_mem_object_info_tests.cpp @@ -38,7 +38,7 @@ class GetMemObjectInfo : public ::testing::Test, public PlatformFixture, public public: void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); DeviceFixture::SetUp(); BufferDefaults::context = new MockContext; } diff --git a/unit_tests/os_interface/hw_info_config_tests.cpp b/unit_tests/os_interface/hw_info_config_tests.cpp index 5d665e6906..c36970805f 100644 --- a/unit_tests/os_interface/hw_info_config_tests.cpp +++ b/unit_tests/os_interface/hw_info_config_tests.cpp @@ -29,7 +29,7 @@ using namespace OCLRT; using namespace std; void HwInfoConfigTest::SetUp() { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); const HardwareInfo &hwInfo = pPlatform->getDevice(0)->getHardwareInfo(); pInHwInfo = const_cast(&hwInfo); diff --git a/unit_tests/preamble/preamble_fixture.h b/unit_tests/preamble/preamble_fixture.h index a47905015c..c3d494793b 100644 --- a/unit_tests/preamble/preamble_fixture.h +++ b/unit_tests/preamble/preamble_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -54,7 +54,7 @@ class PreambleVfeState : public PlatformFixture, ::testing::Test::SetUp(); LinearStreamFixture::SetUp(); HardwareParse::SetUp(); - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); const HardwareInfo &hwInfo = pPlatform->getDevice(0)->getHardwareInfo(); HardwareInfo *pHwInfo = const_cast(&hwInfo); pOldWaTable = pHwInfo->pWaTable; diff --git a/unit_tests/program/program_data_tests.cpp b/unit_tests/program/program_data_tests.cpp index 1b8561fbb1..f112caa1b2 100644 --- a/unit_tests/program/program_data_tests.cpp +++ b/unit_tests/program/program_data_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -58,7 +58,7 @@ class ProgramDataTest : public testing::Test, protected: void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); cl_device_id device = pPlatform->getDevice(0); ContextFixture::SetUp(1, &device); ProgramFixture::SetUp(); diff --git a/unit_tests/program/program_nonuniform.cpp b/unit_tests/program/program_nonuniform.cpp index 5baa2e1969..4b85ccb421 100644 --- a/unit_tests/program/program_nonuniform.cpp +++ b/unit_tests/program/program_nonuniform.cpp @@ -197,7 +197,7 @@ class ProgramNonUniformTest : public ContextFixture, } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); device = pPlatform->getDevice(0); ContextFixture::SetUp(1, &device); ProgramFixture::SetUp(); diff --git a/unit_tests/program/program_with_block_kernels_tests.cpp b/unit_tests/program/program_with_block_kernels_tests.cpp index 2626cbf368..071befe11f 100644 --- a/unit_tests/program/program_with_block_kernels_tests.cpp +++ b/unit_tests/program/program_with_block_kernels_tests.cpp @@ -46,7 +46,7 @@ class ProgramWithBlockKernelsTest : public ContextFixture, } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); device = pPlatform->getDevice(0); ContextFixture::SetUp(1, &device); ProgramFixture::SetUp(); diff --git a/unit_tests/program/program_with_source.h b/unit_tests/program/program_with_source.h index 02a00107c8..fa0605cdc1 100644 --- a/unit_tests/program/program_with_source.h +++ b/unit_tests/program/program_with_source.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -53,7 +53,7 @@ class ProgramFromSourceTest : public ContextFixture, std::tie(SourceFileName, BinaryFileName, KernelName) = GetParam(); kbHelper = new KernelBinaryHelper(BinaryFileName); - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); cl_device_id device = pPlatform->getDevice(0); ContextFixture::SetUp(1, &device); ProgramFixture::SetUp(); diff --git a/unit_tests/sharings/va/context_va_tests.cpp b/unit_tests/sharings/va/context_va_tests.cpp index 9984b9f998..cc629116f1 100644 --- a/unit_tests/sharings/va/context_va_tests.cpp +++ b/unit_tests/sharings/va/context_va_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -38,7 +38,7 @@ struct VAContextTest : public PlatformFixture, } void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); cl_platform_id platform = pPlatform; properties = new cl_context_properties[3]; diff --git a/unit_tests/sharings/va/va_sharing_tests.cpp b/unit_tests/sharings/va/va_sharing_tests.cpp index fa1f686a91..0f5b12825c 100644 --- a/unit_tests/sharings/va/va_sharing_tests.cpp +++ b/unit_tests/sharings/va/va_sharing_tests.cpp @@ -37,7 +37,7 @@ using namespace OCLRT; class VaSharingTests : public ::testing::Test, public PlatformFixture { public: void SetUp() override { - PlatformFixture::SetUp(numPlatformDevices, platformDevices); + PlatformFixture::SetUp(); vaSharing = new MockVaSharing; context.setSharingFunctions(&vaSharing->m_sharingFunctions); vaSharing->updateAcquiredHandle(sharingHandle);