class dlstreamer::BaseMemoryMapper#

Overview#

#include <memory_mapper.h>

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

    BaseMemoryMapper(
        const ContextPtr& input_context,
        const ContextPtr& output_context
    );

    // methods

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

// direct descendants

class MemoryMapperAnyToGST;
class MemoryMapperCPUToOpenCV;
class MemoryMapperCPUToOpenVINO;
class MemoryMapperDMAToOpenCL;
class MemoryMapperDMAToUSM;
class MemoryMapperDMAToVAAPI;
class MemoryMapperFFMPEGToVAAPI;
class MemoryMapperGSTToDMA;
class MemoryMapperGSTToOpenCL;
class MemoryMapperGSTToVAAPI;
class MemoryMapperOpenCLToCPU;
class MemoryMapperOpenCLToDMA;
class MemoryMapperOpenCLToOpenCVUMat;
class MemoryMapperOpenCLToOpenVINO;
class MemoryMapperOpenVINOToCPU;
class MemoryMapperSYCLUSMToCPU;
class MemoryMapperUSMToDMA;
class MemoryMapperVAAPIToDMA;
class MemoryMapperVAAPIToOpenVINO;

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 TensorPtr map(TensorPtr src, 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 FramePtr map(FramePtr src, 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.

TensorPtr map(TensorPtr src, AccessMode mode = AccessMode::ReadWrite)

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

FramePtr map(FramePtr src, AccessMode mode = AccessMode::ReadWrite)

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