namespace ov::element

Overview

namespace element {

// typedefs

typedef std::vector<Type> TypeVector;

// enums

enum Type_t;

// classes

class Type;

// global functions

constexpr Type undefined(Type_t::undefined);
constexpr Type dynamic(Type_t::dynamic);
constexpr Type boolean(Type_t::boolean);
constexpr Type bf16(Type_t::bf16);
constexpr Type f16(Type_t::f16);
constexpr Type f32(Type_t::f32);
constexpr Type f64(Type_t::f64);
constexpr Type i4(Type_t::i4);
constexpr Type i8(Type_t::i8);
constexpr Type i16(Type_t::i16);
constexpr Type i32(Type_t::i32);
constexpr Type i64(Type_t::i64);
constexpr Type u1(Type_t::u1);
constexpr Type u4(Type_t::u4);
constexpr Type u8(Type_t::u8);
constexpr Type u16(Type_t::u16);
constexpr Type u32(Type_t::u32);
constexpr Type u64(Type_t::u64);

template <typename T>
Type from();

OPENVINO_API Type from< char >();
OPENVINO_API Type from< bool >();
OPENVINO_API Type from< float >();
OPENVINO_API Type from< double >();
OPENVINO_API Type from< int8_t >();
OPENVINO_API Type from< int16_t >();
OPENVINO_API Type from< int32_t >();
OPENVINO_API Type from< int64_t >();
OPENVINO_API Type from< uint8_t >();
OPENVINO_API Type from< uint16_t >();
OPENVINO_API Type from< uint32_t >();
OPENVINO_API Type from< uint64_t >();
OPENVINO_API Type from< ov::bfloat16 >();
OPENVINO_API Type from< ov::float16 >();
OPENVINO_API Type fundamental_type_for(const Type& type);

OPENVINO_API std::ostream& operator << (
    std::ostream& out,
    const ov::element::Type& obj
    );

OPENVINO_API std::istream& operator >> (
    std::istream& out,
    ov::element::Type& obj
    );

template <class T>
bool is_max_of(const element::Type_t& type, const T& value);

template <class T>
bool is_min_of(const element::Type_t type, const T& value);

template <class T, class U = T>
U get_value_or_limit_of(
    const element::Type_t& type,
    const T& value
    );

} // namespace element

Detailed Documentation

Global Functions

template <class T>
bool is_max_of(const element::Type_t& type, const T& value)

Check if value has got maximum value of ov::element::Type_t.

Parameters:

T

Input value type.

type

ov::element type to get its maximum.

value

Input value for check.

Returns:

True if input value has got maximum number specified by ov::element type otherwise false.

template <class T>
bool is_min_of(const element::Type_t type, const T& value)

Check if value has got minimum value of ov::element::Type_t.

Parameters:

T

Input value type.

type

ov::element type to get its minimum.

value

Input value for check.

Returns:

True if input value has got minimum number specified by ov::element type otherwise false.

template <class T, class U = T>
U get_value_or_limit_of(
    const element::Type_t& type,
    const T& value
    )

Checks input value for element type maximum or minimum and return limit or value.

Parameters:

T

Type of input value.

U

Type of return value. Default same as T.

type

Type of ov::element::Type_t

value

Input value for check.

Returns:

If value is maximum or minimum get limit of U otherwise value as U.