From 627c35979833ee856cb52f35c3596d22a9ec2169 Mon Sep 17 00:00:00 2001 From: "Jobczyk, Lukasz" Date: Mon, 30 Sep 2019 14:19:48 +0200 Subject: [PATCH] Move Host Ptr Manager to the core dir Change-Id: I48c521acdcd4b3a78eb539026af5ffa840cf2181 Signed-off-by: Jobczyk, Lukasz --- core/memory_manager/CMakeLists.txt | 2 ++ {runtime => core}/memory_manager/host_ptr_manager.cpp | 2 +- {runtime => core}/memory_manager/host_ptr_manager.h | 0 runtime/mem_obj/buffer.cpp | 2 +- runtime/memory_manager/CMakeLists.txt | 2 -- runtime/memory_manager/internal_allocation_storage.cpp | 2 +- runtime/memory_manager/memory_manager.cpp | 2 +- runtime/memory_manager/os_agnostic_memory_manager.cpp | 2 +- runtime/os_interface/linux/drm_memory_manager.cpp | 2 +- runtime/os_interface/windows/wddm_memory_manager.cpp | 2 +- unit_tests/mocks/mock_host_ptr_manager.h | 2 +- unit_tests/os_interface/linux/drm_memory_manager_tests.cpp | 2 +- 12 files changed, 11 insertions(+), 11 deletions(-) rename {runtime => core}/memory_manager/host_ptr_manager.cpp (99%) rename {runtime => core}/memory_manager/host_ptr_manager.h (100%) diff --git a/core/memory_manager/CMakeLists.txt b/core/memory_manager/CMakeLists.txt index c378d0146d..e7c1038bcc 100644 --- a/core/memory_manager/CMakeLists.txt +++ b/core/memory_manager/CMakeLists.txt @@ -15,6 +15,8 @@ set(NEO_CORE_MEMORY_MANAGER ${CMAKE_CURRENT_SOURCE_DIR}/graphics_allocation.h ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/graphics_allocation_extra.cpp ${CMAKE_CURRENT_SOURCE_DIR}/host_ptr_defines.h + ${CMAKE_CURRENT_SOURCE_DIR}/host_ptr_manager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/host_ptr_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/local_memory_usage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/local_memory_usage.h ${CMAKE_CURRENT_SOURCE_DIR}/memory_constants.h diff --git a/runtime/memory_manager/host_ptr_manager.cpp b/core/memory_manager/host_ptr_manager.cpp similarity index 99% rename from runtime/memory_manager/host_ptr_manager.cpp rename to core/memory_manager/host_ptr_manager.cpp index 512becca75..e2ecf1f142 100644 --- a/runtime/memory_manager/host_ptr_manager.cpp +++ b/core/memory_manager/host_ptr_manager.cpp @@ -5,7 +5,7 @@ * */ -#include "runtime/memory_manager/host_ptr_manager.h" +#include "core/memory_manager/host_ptr_manager.h" #include "runtime/memory_manager/memory_manager.h" diff --git a/runtime/memory_manager/host_ptr_manager.h b/core/memory_manager/host_ptr_manager.h similarity index 100% rename from runtime/memory_manager/host_ptr_manager.h rename to core/memory_manager/host_ptr_manager.h diff --git a/runtime/mem_obj/buffer.cpp b/runtime/mem_obj/buffer.cpp index 146156d57e..3278ee2ae2 100644 --- a/runtime/mem_obj/buffer.cpp +++ b/runtime/mem_obj/buffer.cpp @@ -10,6 +10,7 @@ #include "core/helpers/aligned_memory.h" #include "core/helpers/ptr_math.h" #include "core/helpers/string.h" +#include "core/memory_manager/host_ptr_manager.h" #include "core/memory_manager/unified_memory_manager.h" #include "runtime/command_queue/command_queue.h" #include "runtime/command_stream/command_stream_receiver.h" @@ -23,7 +24,6 @@ #include "runtime/helpers/timestamp_packet.h" #include "runtime/helpers/validators.h" #include "runtime/mem_obj/mem_obj_helper.h" -#include "runtime/memory_manager/host_ptr_manager.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/os_interface/debug_settings_manager.h" diff --git a/runtime/memory_manager/CMakeLists.txt b/runtime/memory_manager/CMakeLists.txt index 9e5cc4cb0f..bad06ff854 100644 --- a/runtime/memory_manager/CMakeLists.txt +++ b/runtime/memory_manager/CMakeLists.txt @@ -18,8 +18,6 @@ set(RUNTIME_SRCS_MEMORY_MANAGER ${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter.h ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/storage_info.cpp ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/storage_info.h - ${CMAKE_CURRENT_SOURCE_DIR}/host_ptr_manager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/host_ptr_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/internal_allocation_storage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/internal_allocation_storage.h ${CMAKE_CURRENT_SOURCE_DIR}/memory_banks.h diff --git a/runtime/memory_manager/internal_allocation_storage.cpp b/runtime/memory_manager/internal_allocation_storage.cpp index 1d8ace9d75..d12d74dd6d 100644 --- a/runtime/memory_manager/internal_allocation_storage.cpp +++ b/runtime/memory_manager/internal_allocation_storage.cpp @@ -7,8 +7,8 @@ #include "runtime/memory_manager/internal_allocation_storage.h" +#include "core/memory_manager/host_ptr_manager.h" #include "runtime/command_stream/command_stream_receiver.h" -#include "runtime/memory_manager/host_ptr_manager.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/os_interface/os_context.h" diff --git a/runtime/memory_manager/memory_manager.cpp b/runtime/memory_manager/memory_manager.cpp index c65c7b9e7e..c6886ba4a0 100644 --- a/runtime/memory_manager/memory_manager.cpp +++ b/runtime/memory_manager/memory_manager.cpp @@ -9,6 +9,7 @@ #include "core/helpers/aligned_memory.h" #include "core/helpers/basic_math.h" +#include "core/memory_manager/host_ptr_manager.h" #include "core/utilities/stackvec.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/event/event.h" @@ -24,7 +25,6 @@ #include "runtime/mem_obj/image.h" #include "runtime/memory_manager/deferrable_allocation_deletion.h" #include "runtime/memory_manager/deferred_deleter.h" -#include "runtime/memory_manager/host_ptr_manager.h" #include "runtime/memory_manager/internal_allocation_storage.h" #include "runtime/os_interface/os_context.h" #include "runtime/os_interface/os_interface.h" diff --git a/runtime/memory_manager/os_agnostic_memory_manager.cpp b/runtime/memory_manager/os_agnostic_memory_manager.cpp index 65d80daa49..b0bafce04a 100644 --- a/runtime/memory_manager/os_agnostic_memory_manager.cpp +++ b/runtime/memory_manager/os_agnostic_memory_manager.cpp @@ -10,6 +10,7 @@ #include "core/helpers/aligned_memory.h" #include "core/helpers/basic_math.h" #include "core/helpers/ptr_math.h" +#include "core/memory_manager/host_ptr_manager.h" #include "core/os_interface/os_memory.h" #include "runtime/aub/aub_center.h" #include "runtime/execution_environment/execution_environment.h" @@ -19,7 +20,6 @@ #include "runtime/helpers/hw_info.h" #include "runtime/helpers/options.h" #include "runtime/helpers/surface_formats.h" -#include "runtime/memory_manager/host_ptr_manager.h" #include diff --git a/runtime/os_interface/linux/drm_memory_manager.cpp b/runtime/os_interface/linux/drm_memory_manager.cpp index 113380fded..2172c96a58 100644 --- a/runtime/os_interface/linux/drm_memory_manager.cpp +++ b/runtime/os_interface/linux/drm_memory_manager.cpp @@ -8,6 +8,7 @@ #include "runtime/os_interface/linux/drm_memory_manager.h" #include "core/helpers/ptr_math.h" +#include "core/memory_manager/host_ptr_manager.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/device/device.h" #include "runtime/execution_environment/execution_environment.h" @@ -17,7 +18,6 @@ #include "runtime/helpers/hw_info.h" #include "runtime/helpers/options.h" #include "runtime/helpers/surface_formats.h" -#include "runtime/memory_manager/host_ptr_manager.h" #include "runtime/os_interface/linux/allocator_helper.h" #include "runtime/os_interface/linux/os_context_linux.h" #include "runtime/os_interface/linux/os_interface.h" diff --git a/runtime/os_interface/windows/wddm_memory_manager.cpp b/runtime/os_interface/windows/wddm_memory_manager.cpp index 829f822b9a..f6597fad66 100644 --- a/runtime/os_interface/windows/wddm_memory_manager.cpp +++ b/runtime/os_interface/windows/wddm_memory_manager.cpp @@ -9,6 +9,7 @@ #include "core/helpers/aligned_memory.h" #include "core/helpers/ptr_math.h" +#include "core/memory_manager/host_ptr_manager.h" #include "core/memory_manager/memory_operations_handler.h" #include "runtime/command_stream/command_stream_receiver_hw.h" #include "runtime/device/device.h" @@ -19,7 +20,6 @@ #include "runtime/helpers/surface_formats.h" #include "runtime/memory_manager/deferrable_deletion.h" #include "runtime/memory_manager/deferred_deleter.h" -#include "runtime/memory_manager/host_ptr_manager.h" #include "runtime/os_interface/os_interface.h" #include "runtime/os_interface/windows/os_context_win.h" #include "runtime/os_interface/windows/os_interface.h" diff --git a/unit_tests/mocks/mock_host_ptr_manager.h b/unit_tests/mocks/mock_host_ptr_manager.h index d3e3d588c6..42fce2be63 100644 --- a/unit_tests/mocks/mock_host_ptr_manager.h +++ b/unit_tests/mocks/mock_host_ptr_manager.h @@ -6,7 +6,7 @@ */ #pragma once -#include "runtime/memory_manager/host_ptr_manager.h" +#include "core/memory_manager/host_ptr_manager.h" namespace NEO { class MockHostPtrManager : public HostPtrManager { diff --git a/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp b/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp index a4d5bcd08c..ed2502b5f3 100644 --- a/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp +++ b/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp @@ -10,6 +10,7 @@ #include "core/command_stream/linear_stream.h" #include "core/helpers/aligned_memory.h" #include "core/helpers/ptr_math.h" +#include "core/memory_manager/host_ptr_manager.h" #include "core/memory_manager/memory_constants.h" #include "core/unit_tests/helpers/debug_manager_state_restore.h" #include "runtime/command_stream/device_command_stream.h" @@ -18,7 +19,6 @@ #include "runtime/helpers/timestamp_packet.h" #include "runtime/mem_obj/buffer.h" #include "runtime/mem_obj/image.h" -#include "runtime/memory_manager/host_ptr_manager.h" #include "runtime/os_interface/linux/allocator_helper.h" #include "runtime/os_interface/linux/drm_allocation.h" #include "runtime/os_interface/linux/drm_buffer_object.h"