class dlstreamer::MemoryMapperChain#

Overview#

#include <memory_mapper_factory.h>

class MemoryMapperChain: public dlstreamer::MemoryMapper {
public:
    // construction

    MemoryMapperChain(std::initializer_list<MemoryMapperPtr> l);
    MemoryMapperChain(const std::vector<MemoryMapperPtr>& v);

    // methods

    virtual dlstreamer::TensorPtr map(
        dlstreamer::TensorPtr src,
        dlstreamer::AccessMode mode
    );

    virtual dlstreamer::FramePtr map(
        dlstreamer::FramePtr src,
        dlstreamer::AccessMode mode
    );

    virtual ContextPtr input_context() const;
    virtual ContextPtr output_context() const;
};

Inherited Members#

public:
    // methods

    virtual TensorPtr map(TensorPtr src, AccessMode mode = AccessMode::ReadWrite) = 0;
    virtual FramePtr map(FramePtr src, AccessMode mode = AccessMode::ReadWrite) = 0;
    virtual ContextPtr input_context() const = 0;
    virtual ContextPtr output_context() const = 0;

Detailed Documentation#

Methods#

virtual dlstreamer::TensorPtr map(
    dlstreamer::TensorPtr src,
    dlstreamer::AccessMode mode
)

Map tensor into another context. The function returns mapped tensor, so that the parent() on output tensor returns original tensor and context() on output tensor returns input_context().

Parameters:

src

Tensor to map

mode

Access mode - read or write or read+write

virtual dlstreamer::FramePtr map(
    dlstreamer::FramePtr src,
    dlstreamer::AccessMode mode
)

Map frame into another context. The function returns mapped frame, so that the parent() on output frame returns original frame and context() on output frame returns input_context().

Parameters:

src

Frame to map

mode

Access mode - read or write or read+write

virtual ContextPtr input_context() const

Returns context specified as input context on mapper object creation.

virtual ContextPtr output_context() const

Returns context specified as output context on mapper object creation.