Program Listing for File response_memory_probs.hpp

Return to documentation for file (morpheus/_lib/include/morpheus/messages/memory/response_memory_probs.hpp)


/* * SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include "morpheus/messages/memory/response_memory.hpp" #include "morpheus/objects/tensor_object.hpp" #include "morpheus/types.hpp" // for TensorMap #include <pybind11/pytypes.h> #include <memory> namespace morpheus { /****** Component public implementations *******************/ /****** ResponseMemoryProbs*********************************/ class ResponseMemoryProbs : public ResponseMemory { public: ResponseMemoryProbs(TensorIndex count, TensorObject&& probs); ResponseMemoryProbs(TensorIndex count, TensorMap&& tensors); const TensorObject& get_probs() const; void set_probs(TensorObject&& probs); }; /****** ResponseMemoryProbsInterfaceProxy*******************/ #pragma GCC visibility push(default) struct ResponseMemoryProbsInterfaceProxy : public ResponseMemoryInterfaceProxy { static std::shared_ptr<ResponseMemoryProbs> init(TensorIndex count, pybind11::object probs); static pybind11::object get_probs(ResponseMemoryProbs& self); static void set_probs(ResponseMemoryProbs& self, pybind11::object cupy_values); }; #pragma GCC visibility pop // end of group } // namespace morpheus

© Copyright 2024, NVIDIA. Last updated on Apr 25, 2024.