From 054f2b503acf392c1d5b456dba232de2c6942b7a Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Tue, 21 Jan 2020 09:51:13 +0100 Subject: [PATCH] Remove not used method Change-Id: I6109d4f1521de157f449cad92ecfbab3d133f815 Signed-off-by: Dunajski, Bartosz --- runtime/context/context.h | 1 - runtime/context/context_extra.cpp | 6 +----- .../command_queue/blit_enqueue_tests.cpp | 4 +--- unit_tests/context/CMakeLists.txt | 3 +-- .../context_extra_properties_tests.cpp | 19 ------------------- unit_tests/mem_obj/buffer_tests.cpp | 4 +--- 6 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 unit_tests/context/context_extra_properties_tests.cpp diff --git a/runtime/context/context.h b/runtime/context/context.h index 9f6cc7d95e..f7b697c802 100644 --- a/runtime/context/context.h +++ b/runtime/context/context.h @@ -133,7 +133,6 @@ class Context : public BaseObject<_cl_context> { ContextType peekContextType() { return this->contextType; } - MOCKABLE_VIRTUAL CommandStreamReceiver *getCommandStreamReceiverForBlitOperation(MemObj &memObj) const; MOCKABLE_VIRTUAL BlitOperationResult blitMemoryToAllocation(MemObj &memObj, GraphicsAllocation *memory, void *hostPtr, size_t size) const; protected: diff --git a/runtime/context/context_extra.cpp b/runtime/context/context_extra.cpp index 4091a33c0e..fd31cf35fd 100644 --- a/runtime/context/context_extra.cpp +++ b/runtime/context/context_extra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,10 +15,6 @@ cl_int Context::processExtraProperties(cl_context_properties propertyType, cl_co return CL_INVALID_PROPERTY; } -CommandStreamReceiver *Context::getCommandStreamReceiverForBlitOperation(MemObj &memObj) const { - return nullptr; -} - BlitOperationResult Context::blitMemoryToAllocation(MemObj &memObj, GraphicsAllocation *memory, void *hostPtr, size_t size) const { return BlitOperationResult::Unsupported; } diff --git a/unit_tests/command_queue/blit_enqueue_tests.cpp b/unit_tests/command_queue/blit_enqueue_tests.cpp index 93fcb0923c..dd0b17ff72 100644 --- a/unit_tests/command_queue/blit_enqueue_tests.cpp +++ b/unit_tests/command_queue/blit_enqueue_tests.cpp @@ -27,9 +27,7 @@ struct BlitAuxTranslationTests : public ::testing::Test { bcsCsr->setupContext(*bcsOsContext); bcsCsr->initializeTagAllocation(); } - CommandStreamReceiver *getCommandStreamReceiverForBlitOperation(MemObj &memObj) const override { - return bcsCsr.get(); - } + BlitOperationResult blitMemoryToAllocation(MemObj &memObj, GraphicsAllocation *memory, void *hostPtr, size_t size) const override { auto blitProperties = BlitProperties::constructPropertiesForReadWriteBuffer(BlitterConstants::BlitDirection::HostPtrToBuffer, *bcsCsr, memory, nullptr, diff --git a/unit_tests/context/CMakeLists.txt b/unit_tests/context/CMakeLists.txt index 13eac3268d..cf897f24a3 100644 --- a/unit_tests/context/CMakeLists.txt +++ b/unit_tests/context/CMakeLists.txt @@ -1,12 +1,11 @@ # -# Copyright (C) 2017-2019 Intel Corporation +# Copyright (C) 2017-2020 Intel Corporation # # SPDX-License-Identifier: MIT # set(IGDRCL_SRCS_tests_context ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/context_extra_properties_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/context_get_info_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/context_multi_device_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/context_negative_tests.cpp diff --git a/unit_tests/context/context_extra_properties_tests.cpp b/unit_tests/context/context_extra_properties_tests.cpp deleted file mode 100644 index 180f6dde92..0000000000 --- a/unit_tests/context/context_extra_properties_tests.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "test.h" -#include "unit_tests/mocks/mock_buffer.h" -#include "unit_tests/mocks/mock_context.h" - -using namespace NEO; - -TEST(ContextExtraPropertiesTests, givenAnyBufferWhenGettingCsrForBlitOperationThenNullIsReturned) { - MockContext context; - MockBuffer buffer; - auto csr = context.getCommandStreamReceiverForBlitOperation(buffer); - EXPECT_EQ(nullptr, csr); -} diff --git a/unit_tests/mem_obj/buffer_tests.cpp b/unit_tests/mem_obj/buffer_tests.cpp index b49ace4fbe..eb4787f85e 100644 --- a/unit_tests/mem_obj/buffer_tests.cpp +++ b/unit_tests/mem_obj/buffer_tests.cpp @@ -654,9 +654,7 @@ struct BcsBufferTests : public ::testing::Test { bcsCsr->setupContext(*bcsOsContext); bcsCsr->initializeTagAllocation(); } - CommandStreamReceiver *getCommandStreamReceiverForBlitOperation(MemObj &memObj) const override { - return bcsCsr.get(); - } + BlitOperationResult blitMemoryToAllocation(MemObj &memObj, GraphicsAllocation *memory, void *hostPtr, size_t size) const override { auto blitProperties = BlitProperties::constructPropertiesForReadWriteBuffer(BlitterConstants::BlitDirection::HostPtrToBuffer, *bcsCsr, memory, nullptr,