From b9a3adee30a4be685bc080804bfc6b7a979f5c44 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Tue, 31 Oct 2023 11:53:03 +0000 Subject: [PATCH] test: fix compilation error of mt tests in clang on Windows Signed-off-by: Mateusz Jablonski --- .../mt_tests/sharing/d3d_sharing_mt_tests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opencl/test/unit_test/mt_tests/sharing/d3d_sharing_mt_tests.cpp b/opencl/test/unit_test/mt_tests/sharing/d3d_sharing_mt_tests.cpp index bab52ecb11..90fd512cf3 100644 --- a/opencl/test/unit_test/mt_tests/sharing/d3d_sharing_mt_tests.cpp +++ b/opencl/test/unit_test/mt_tests/sharing/d3d_sharing_mt_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -62,10 +62,10 @@ TEST(SharingD3DMT, givenD3DSharingWhenSynchroniceObjectIsCalledThenMtxIsLockedBe mockCtx->sharingFunctions[MockD3DSharingFunctions::sharingId] = std::make_unique>(); auto mockD3DSharing = std::make_unique>(mockCtx.get()); UpdateData updateData(0); - std::thread t1(&MockD3DSharingBase::synchronizeObject, mockD3DSharing.get(), updateData); + std::thread t1([&] { mockD3DSharing->synchronizeObject(updateData); }); while (!reinterpret_cast *>(mockD3DSharing->sharingFunctions)->signalDeviceContextCalled) ; - std::thread t2(&MockD3DSharingBase::checkIfMutexWasLocked, mockD3DSharing.get()); + std::thread t2([&] { mockD3DSharing->checkIfMutexWasLocked(); }); t1.join(); t2.join(); EXPECT_TRUE(mockD3DSharing->isLocked); @@ -76,10 +76,10 @@ TEST(SharingD3DMT, givenD3DSharingWhenReleaseResourceIsCalledThenMtxIsLockedBefo mockCtx->sharingFunctions[MockD3DSharingFunctions::sharingId] = std::make_unique>(); auto mockD3DSharing = std::make_unique>(mockCtx.get()); UpdateData updateData(0); - std::thread t1(&MockD3DSharingBase::releaseResource, mockD3DSharing.get(), nullptr, 0); + std::thread t1([&] { mockD3DSharing->releaseResource(nullptr, 0); }); while (!reinterpret_cast *>(mockD3DSharing->sharingFunctions)->signalDeviceContextCalled) ; - std::thread t2(&MockD3DSharingBase::checkIfMutexWasLocked, mockD3DSharing.get()); + std::thread t2([&] { mockD3DSharing->checkIfMutexWasLocked(); }); t1.join(); t2.join(); EXPECT_TRUE(mockD3DSharing->isLocked);