class dlstreamer::GSTTensor#

#include <tensor.h>

class GSTTensor: public dlstreamer::BaseTensor {
public:
    // construction

    GSTTensor(
        const TensorInfo& info,
        GstMemory* mem,
        bool take_ownership,
        ContextPtr context,
        int planeIdx = 0
    );

    // methods

    GstMemory* gst_memory() const;
    operator GstMemory * () const;
    int offset_x() const;
    int offset_y() const;
    int plane_index() const;
    void crop(int x, int y, int w, int h);
};

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;

    virtual MemoryType memory_type() const;
    virtual void* data() const;
    virtual handle_t handle(std::string_view key) const;
    virtual handle_t handle(std::string_view key, handle_t default_value) const;
    virtual const TensorInfo& info() const;
    virtual ContextPtr context() const;
    virtual TensorPtr parent() const;
    void set_parent(TensorPtr parent);
    void set_handle(const std::string& key, handle_t handle);