Program Listing for File tensor_memory.hpp

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


#pragma once #include "morpheus/objects/tensor_object.hpp"// for TensorIndex, TensorObject #include <cstddef>// for size_t #include <map> #include <string> #include <utility>// for pair #include <vector> namespace morpheus { /****** Component public implementations *******************/ /****** TensorMemory****************************************/ class TensorMemory { public: using tensor_map_t = std::map<std::string, TensorObject>; TensorMemory(size_t count); TensorMemory(size_t count, tensor_map_t &&tensors); virtual ~TensorMemory() = default; size_t count{0}; tensor_map_t tensors; bool has_tensor(const std::string &name) const; tensor_map_t copy_tensor_ranges(const std::vector<std::pair<TensorIndex, TensorIndex>> &ranges, size_t num_selected_rows) const; }; // end of group } // namespace morpheus

© Copyright 2023, NVIDIA. Last updated on Feb 3, 2023.