class ov::RemoteTensor

Overview

Remote memory access and interoperability API. More…

#include <remote_tensor.hpp>

class RemoteTensor: public ov::Tensor
{
public:
    // methods

    static void type_check(
        const Tensor& tensor,
        const std::map<std::string, std::vector<std::string>>& type_info = {}
        );

    void \* data(const element::Type);

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

    ov::AnyMap get_params() const;
};

// direct descendants

class ClBufferTensor;
class ClImage2DTensor;
class USMTensor;

Inherited Members

public:
    // methods

    Tensor& operator = (const Tensor& other);
    Tensor& operator = (Tensor&& other);
    void set_shape(const ov::Shape& shape);
    element::Type get_element_type() const;
    Shape get_shape() const;
    size_t get_size() const;
    size_t get_byte_size() const;
    Strides get_strides() const;
    void \* data(const element::Type type = {}) const;

    template <typename T, typename datatype = typename std::decay<T>::type>
    T \* data() const;

    bool operator ! () const;
    operator bool () const;

    template <typename T>
    std::enable_if<std::is_base_of<Tensor, T>::value, bool>::type is() const;

    template <typename T>
    const std::enable_if<std::is_base_of<Tensor, T>::value, T>::type as() const;

    static void type_check(const Tensor& tensor);

Detailed Documentation

Remote memory access and interoperability API.

Methods

static void type_check(
    const Tensor& tensor,
    const std::map<std::string, std::vector<std::string>>& type_info = {}
    )

Checks OpenVINO remote type.

Parameters:

tensor

Tensor which type is checked.

type_info

Map with remote object runtime info.

Exception

if type check with specified parameters failed.

void \* data(const element::Type)

Access to host memory is not available for RemoteTensor. To access a device-specific memory, cast to a specific RemoteTensor derived object and work with its properties or parse device memory properties via RemoteTensor::get_params.

Returns:

Nothing, throws an exception.

ov::AnyMap get_params() const

Returns a map of device-specific parameters required for low-level operations with underlying object. Parameters include device/context/surface/buffer handles, access flags, etc. Content of the returned map depends on remote execution context that is currently set on the device (working scenario). Abstract method.

Returns:

A map of name/parameter elements.