class dlstreamer::InferenceResultMetadata::TensorImpl#

class TensorImpl: public dlstreamer::Tensor {
public:
    // construction

    TensorImpl(void* data, const TensorInfo& info);

    // methods

    const TensorInfo& info() const;
    MemoryType memory_type() const;
    virtual ContextPtr context() const;
    void* data() const;
    handle_t handle(std::string_view) const;
    handle_t handle(std::string_view, handle_t) const;
    TensorPtr parent() const;
};

Inherited Members#

public:
    // typedefs

    typedef intptr_t handle_t;

    // methods

    Tensor& operator = (const Tensor&);
    virtual const TensorInfo& info() const = 0;
    virtual MemoryType memory_type() const = 0;
    virtual ContextPtr context() const = 0;
    virtual void* data() const = 0;
    virtual handle_t handle(std::string_view key = {}) const = 0;
    virtual handle_t handle(std::string_view key, handle_t default_value) const = 0;
    virtual TensorPtr parent() const = 0;

    template <typename T>
    T* data() const;

    template <typename T>
    T* data(
        std::vector<size_t> offset,
        bool left_offset = true
    ) const;