From d12a7ac71e0c65fd6887c7f11807cb637a896a95 Mon Sep 17 00:00:00 2001 From: David Gardner <96306125+dagardner-nv@users.noreply.github.com> Date: Tue, 9 Apr 2024 09:45:37 -0700 Subject: [PATCH] Move MemoryDescriptor to the morpheus namespace (#1602) * Move `MemoryDescriptor` to the morpheus namespace * Technically a C++ API breaking change, although I can't imagine this impacting any users. Closes #1601 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md). - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: https://github.com/nv-morpheus/Morpheus/pull/1602 --- .../include/morpheus/objects/memory_descriptor.hpp | 10 ++++++++++ morpheus/_lib/src/objects/memory_descriptor.cpp | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/morpheus/_lib/include/morpheus/objects/memory_descriptor.hpp b/morpheus/_lib/include/morpheus/objects/memory_descriptor.hpp index 83d98fc2bd..6c55baa85c 100644 --- a/morpheus/_lib/include/morpheus/objects/memory_descriptor.hpp +++ b/morpheus/_lib/include/morpheus/objects/memory_descriptor.hpp @@ -23,6 +23,13 @@ #include "cuda/memory_resource" +namespace morpheus { +/** + * @addtogroup objects + * @{ + * @file + */ + /** * @brief Struct describing device memory resources. * @@ -47,3 +54,6 @@ struct MORPHEUS_EXPORT MemoryDescriptor // Memory resource cuda::mr::async_resource_ref memory_resource; }; + +/** @} */ // end of group +} // namespace morpheus diff --git a/morpheus/_lib/src/objects/memory_descriptor.cpp b/morpheus/_lib/src/objects/memory_descriptor.cpp index 3329bee6bc..7e239cdd38 100644 --- a/morpheus/_lib/src/objects/memory_descriptor.cpp +++ b/morpheus/_lib/src/objects/memory_descriptor.cpp @@ -21,8 +21,12 @@ #include // for move +namespace morpheus { + MemoryDescriptor::MemoryDescriptor(rmm::cuda_stream_view stream, cuda::mr::async_resource_ref mem_resource) : cuda_stream(std::move(stream)), memory_resource(mem_resource) {} + +} // namespace morpheus