Class TensorMemory

Derived Types

class TensorMemory

Container for holding a collection of named TensorObjects in a std::map keyed by name. Base class for InferenceMemory & 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

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