Group Element types#

group ov_element_cpp_api

OpenVINO Element API to work with OpenVINO element types

Enums

enum class Type_t#

Enum to define possible element types.

Values:

enumerator undefined#

Undefined element type.

enumerator dynamic#

Dynamic element type.

enumerator boolean#

boolean element type

enumerator bf16#

bf16 element type

enumerator f16#

f16 element type

enumerator f32#

f32 element type

enumerator f64#

f64 element type

enumerator i4#

i4 element type

enumerator i8#

i8 element type

enumerator i16#

i16 element type

enumerator i32#

i32 element type

enumerator i64#

i64 element type

enumerator u1#

binary element type

enumerator u2#

u2 element type

enumerator u3#

u3 element type

enumerator u4#

u4 element type

enumerator u6#

u6 element type

enumerator u8#

u8 element type

enumerator u16#

u16 element type

enumerator u32#

u32 element type

enumerator u64#

u64 element type

enumerator nf4#

nf4 element type

enumerator f8e4m3#

f8e4m3 element type

enumerator f8e5m2#

f8e5m2 element type

enumerator string#

string element type

Functions

constexpr Type undefined(Type_t::undefined)#

undefined element type

constexpr Type dynamic(Type_t::dynamic)#

dynamic element type

constexpr Type boolean(Type_t::boolean)#

boolean element type

constexpr Type bf16(Type_t::bf16)#

bf16 element type

constexpr Type f16(Type_t::f16)#

f16 element type

constexpr Type f32(Type_t::f32)#

f32 element type

constexpr Type f64(Type_t::f64)#

f64 element type

constexpr Type i4(Type_t::i4)#

i4 element type

constexpr Type i8(Type_t::i8)#

i8 element type

constexpr Type i16(Type_t::i16)#

i16 element type

constexpr Type i32(Type_t::i32)#

i32 element type

constexpr Type i64(Type_t::i64)#

i64 element type

constexpr Type u1(Type_t::u1)#

binary element type

constexpr Type u2(Type_t::u2)#

u2 element type

constexpr Type u3(Type_t::u3)#

u3 element type

constexpr Type u4(Type_t::u4)#

u4 element type

constexpr Type u6(Type_t::u6)#

u6 element type

constexpr Type u8(Type_t::u8)#

u8 element type

constexpr Type u16(Type_t::u16)#

u16 element type

constexpr Type u32(Type_t::u32)#

u32 element type

constexpr Type u64(Type_t::u64)#

u64 element type

constexpr Type nf4(Type_t::nf4)#

nf4 element type

constexpr Type f8e4m3(Type_t::f8e4m3)#

f8e4m3 element type

constexpr Type f8e5m2(Type_t::f8e5m2)#

f8e4m3 element type

constexpr Type string(Type_t::string)#

string element type

class Type
#include <element_type.hpp>

Base class to define element type.

Public Functions

bool compatible(const element::Type &t) const

Checks whether this element type is merge-compatible with t.

Parameters:

t – The element type to compare this element type to.

Returns:

true if this element type is compatible with t, else false.

Public Static Functions

static bool merge(element::Type &dst, const element::Type &t1, const element::Type &t2)

Merges two element types t1 and t2, writing the result into dst and returning true if successful, else returning false.

To “merge” two element types t1 and t2 is to find the least restrictive element type t that is no more restrictive than t1 and t2, if t exists. More simply:

merge(dst,element::Type::dynamic,t) writes t to dst and returns true

merge(dst,t,element::Type::dynamic) writes t to dst and returns true

merge(dst,t1,t2) where t1, t2 both static and equal writes t1 to dst and returns true

merge(dst,t1,t2) where t1, t2 both static and unequal does nothing to dst, and returns false