namespace ov::op

Overview

namespace op {

// namespaces

namespace ov::op::ShapeInferLSTM;
namespace ov::op::ShapeInferRange;
namespace ov::op::eye;
namespace ov::op::internal;
namespace ov::op::rnn;
namespace ov::op::slice;
namespace ov::op::util;
    namespace ov::op::util::detail;
    namespace ov::op::util::error;
    namespace ov::op::util::rfft_common_validation;
namespace ov::op::v0;
namespace ov::op::v1;
    namespace ov::op::v1::utils;
        namespace ov::op::v1::utils::one_hot;
namespace ov::op::v10;
namespace ov::op::v3;
namespace ov::op::v4;
namespace ov::op::v5;
namespace ov::op::v6;
namespace ov::op::v7;
namespace ov::op::v8;
namespace ov::op::v9;

// enums

enum AutoBroadcastType;
enum BroadcastType;
enum EpsMode;
enum GeluApproximationMode;
enum LSTMWeightsFormat;
enum MVNEpsMode;
enum PadMode;
enum PadType;
enum RecurrentSequenceDirection;
enum RoundingType;
enum TopKMode;
enum TopKSortType;

// structs

struct AutoBroadcastSpec;
struct BroadcastModeSpec;

// classes

class Op;
class Sink;
class TemporaryReplaceOutputType;
template <typename BaseOp>
class TypeRelaxed;
class TypeRelaxedBase;

// global functions

OPENVINO_API std::ostream& operator << (
    std::ostream& s,
    const GeluApproximationMode& type
    );

ov::op::util::LSTMWeightsFormat convert_lstm_weights_enums(LSTMWeightsFormat format);
OPENVINO_API std::ostream& operator << (std::ostream& s, const MVNEpsMode& type);
OPENVINO_API std::ostream& operator << (std::ostream& s, const PadMode& type);
OPENVINO_API std::ostream& operator << (std::ostream& s, const PadType& type);
OPENVINO_API std::ostream& operator << (std::ostream& s, const RoundingType& type);

OPENVINO_API std::ostream& operator << (
    std::ostream& s,
    const AutoBroadcastType& type
    );

OPENVINO_API std::ostream& operator << (
    std::ostream& s,
    const BroadcastType& type
    );

OPENVINO_API std::ostream& operator << (std::ostream& s, const EpsMode& type);
OPENVINO_API std::ostream& operator << (std::ostream& s, const TopKSortType& type);
OPENVINO_API std::ostream& operator << (std::ostream& s, const TopKMode& type);

OPENVINO_API std::ostream& operator << (
    std::ostream& s,
    const RecurrentSequenceDirection& direction
    );

template <class OpType, class ShapeType>
void read_value_shape_infer(
    const OpType \* op,
    const std::vector<ShapeType>& input_shapes,
    std::vector<ShapeType>& output_shapes
    );

template <
    class TShape,
    class TData,
    class TRes = std::vector<TData>,
    class TTensorPtr = HostTensorPtr,
    class UnaryOperation = ov::util::Cast<TData>,
    typename std::enable_if<!std::is_same<TShape, ov::PartialShape>::value>::type \* = nullptr
    >
std::unique_ptr<TRes> get_input_const_data_as(
    const ov::Node \* op,
    size_t idx,
    const std::map<size_t, TTensorPtr>& constant_data = {},
    UnaryOperation&& func = ov::util::Cast<TData>()
    );

template <
    class TShape,
    class TDimValue = typename TShape::value_type::value_type,
    class TTensorPtr = HostTensorPtr,
    class UnaryOperation = ov::util::InTypeRange<TDimValue>
    >
std::unique_ptr<TShape> get_input_const_data_as_shape(
    const ov::Node \* op,
    size_t idx,
    const std::map<size_t, TTensorPtr>& constant_data = {},
    UnaryOperation&& func = ov::util::InTypeRange<TDimValue>()
    );

} // namespace op

Detailed Documentation

Global Functions

template <
    class TShape,
    class TData,
    class TRes = std::vector<TData>,
    class TTensorPtr = HostTensorPtr,
    class UnaryOperation = ov::util::Cast<TData>,
    typename std::enable_if<!std::is_same<TShape, ov::PartialShape>::value>::type \* = nullptr
    >
std::unique_ptr<TRes> get_input_const_data_as(
    const ov::Node \* op,
    size_t idx,
    const std::map<size_t, TTensorPtr>& constant_data = {},
    UnaryOperation&& func = ov::util::Cast<TData>()
    )

Get the operator’s input const as pointer to vector of specified type.

The behaviour depends on shape type. The default output type is std::vector<TData> can be replace by other type which if is possible to construct it from constant data vector.

The behaviour depends on shape type. The default output type is std::vector<TData> can be replace by other type which if is possible to construct it from constant data vector.

Parameters:

TShape

Shape type which enabled this version (not ov::PartialShape)

TData

Type use to cast input’s data.

TRes

Result type which has got default type as std::vector<TData>.

TTensorPtr

Type of tensor pointer or reference_wrapper. Default HostTensorPtr.

UnaryOperation

Unary function object applied on data with signature (Ret f(const TData &a)).

op

Pointer to operator.

idx

Operator’s input number.

constant_data

Map with constant. Default empty.

func

Unary operation function object.

TShape

Shape type which enabled this version (ov::PartialShape)

TData

Type use to cast input’s data.

TRes

Result type which has got default type as std::vector<TData>.

TTensorPtr

Type of tensor pointer or reference_wrapper. Default HostTensorPtr.

UnaryOperation

Unary function object applied on data with signature (Ret f(const TData &a)).

op

Pointer to operator.

idx

Operator’s input number.

constant_data

Map with constant. Default empty.

func

Unary operation function object.

Returns:

Pointer to constant data or nullptr if input has no constant data.

Pointer to constant data or nullptr if input has no constant data.

template <
    class TShape,
    class TDimValue = typename TShape::value_type::value_type,
    class TTensorPtr = HostTensorPtr,
    class UnaryOperation = ov::util::InTypeRange<TDimValue>
    >
std::unique_ptr<TShape> get_input_const_data_as_shape(
    const ov::Node \* op,
    size_t idx,
    const std::map<size_t, TTensorPtr>& constant_data = {},
    UnaryOperation&& func = ov::util::InTypeRange<TDimValue>()
    )

Get the input const data as shape object.

The input data can be processed by unary operation. By default is validated and casted to shape’s dimension type.

Parameters:

TShape

TTensorPtr

Type of tensor pointer or reference_wrapper. Default HostTensorPtr.

UnaryOperation

Unary function object applied on data with signature (Ret f(const TDimValue &a)).

op

Pointer to operator.

idx

Operator input index.

constant_data

Map with constant data. Default empty.

func

Unary operation function object to apply in input data. Default ov::utils::InTypeRange<TDimValue>.

Returns:

Unique pointer to shape created from input data.