Skip to content

Commit

Permalink
Rename methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Jan 25, 2024
1 parent 4d3625f commit 2f08e41
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
24 changes: 12 additions & 12 deletions morpheus/_lib/include/morpheus/stages/deserialize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ using namespace std::literals::string_literals;
#pragma GCC visibility push(default)
using cm_task_t = std::pair<std::string, nlohmann::json>;

void make_windowed_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<MultiMessage>& windowed_message);

void make_windowed_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<ControlMessage>& windowed_message);
void make_output_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<MultiMessage>& windowed_message);

void make_output_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<ControlMessage>& windowed_message);

template <typename OutputT>
class DeserializeStage : public mrc::pymrc::PythonNode<std::shared_ptr<MessageMeta>, std::shared_ptr<OutputT>>
Expand Down Expand Up @@ -161,7 +161,7 @@ typename DeserializeStage<OutputT>::subscribe_fn_t DeserializeStage<OutputT>::bu
for (TensorIndex i = 0; i < x->count(); i += this->m_batch_size)
{
std::shared_ptr<OutputT> windowed_message{nullptr};
make_windowed_message(
make_output_message(
full_message, i, std::min(i + this->m_batch_size, x->count()), m_task.get(), windowed_message);
output.on_next(std::move(windowed_message));
}
Expand Down
20 changes: 10 additions & 10 deletions morpheus/_lib/src/stages/deserialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@

namespace morpheus {

void make_windowed_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<MultiMessage>& windowed_message)
void make_output_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<MultiMessage>& windowed_message)
{
DCHECK_EQ(task, nullptr) << "Task is not supported for MultiMessage";
auto sliced_msg = full_message->get_slice(start, stop);
windowed_message.swap(sliced_msg);
}

void make_windowed_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<ControlMessage>& windowed_message)
void make_output_message(std::shared_ptr<MultiMessage>& full_message,
TensorIndex start,
TensorIndex stop,
cm_task_t* task,
std::shared_ptr<ControlMessage>& windowed_message)
{
auto window = full_message->copy_ranges({{start, stop}}, stop - start);
auto new_message = std::make_shared<ControlMessage>();
Expand Down

0 comments on commit 2f08e41

Please sign in to comment.