Defined in File tensor_memory.hpp
Derived Types
public morpheus::InferenceMemory
(Class InferenceMemory)public morpheus::ResponseMemory
(Class ResponseMemory)
-
class TensorMemory
Container for holding a collection of named
TensorObject
s in astd::map
keyed by name. Base class forInferenceMemory
&ResponseMemory
Subclassed by morpheus::InferenceMemory, morpheus::ResponseMemory
Public Types
-
using tensor_map_t = std::map<std::string, TensorObject>
Public Functions
-
TensorMemory(size_t count)
Construct a new Tensor Memory object.
- Parameters
count –
-
TensorMemory(size_t count, tensor_map_t &&tensors)
Construct a new Tensor Memory object.
- Parameters
count –
tensors –
-
virtual ~TensorMemory() = default
-
bool has_tensor(const std::string &name) const
Verify whether the specified tensor name is present in the tensor memory.
- Parameters
name –
- Returns
true
- Returns
false
-
tensor_map_t copy_tensor_ranges(const std::vector<std::pair<TensorIndex, TensorIndex>> &ranges, size_t num_selected_rows) const
Copy tensor ranges.
- Parameters
ranges –
num_selected_rows –
- Returns
tensor_map_t
Public Members
-
size_t count = {0}
-
tensor_map_t tensors
-
using tensor_map_t = std::map<std::string, TensorObject>