Skip to content

Commit

Permalink
Move MemoryDescriptor to the morpheus namespace (#1602)
Browse files Browse the repository at this point in the history
* 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: #1602
  • Loading branch information
dagardner-nv authored Apr 9, 2024
1 parent 3a6fb76 commit d12a7ac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions morpheus/_lib/include/morpheus/objects/memory_descriptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@

#include "cuda/memory_resource"

namespace morpheus {
/**
* @addtogroup objects
* @{
* @file
*/

/**
* @brief Struct describing device memory resources.
*
Expand All @@ -47,3 +54,6 @@ struct MORPHEUS_EXPORT MemoryDescriptor
// Memory resource
cuda::mr::async_resource_ref<cuda::mr::device_accessible> memory_resource;
};

/** @} */ // end of group
} // namespace morpheus
4 changes: 4 additions & 0 deletions morpheus/_lib/src/objects/memory_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@

#include <utility> // for move

namespace morpheus {

MemoryDescriptor::MemoryDescriptor(rmm::cuda_stream_view stream,
cuda::mr::async_resource_ref<cuda::mr::device_accessible> mem_resource) :
cuda_stream(std::move(stream)),
memory_resource(mem_resource)
{}

} // namespace morpheus

0 comments on commit d12a7ac

Please sign in to comment.