namespace ov::cmp

Overview

namespace cmp {

// enums

enum Bound;

// classes

template <class T, Bound BMode = Bound::NONE>
class Between;
template <class T>
class Equal;

// global functions

template <
    class T,
    class U,
    typename std::enable_if<((std::is_signed<T>::value||std::is_same<T, float16>::value)&&(std::is_signed<U>::value||std::is_same<U, float16>::value))||(std::is_unsigned<T>::value&&std::is_unsigned<U>::value)>::type \* = nullptr
    >
constexpr bool lt(
    T a,
    U b
    );

template <class T, class U>
constexpr bool gt(T a, U b);

template <class T, class U>
constexpr bool le(T a, U b);

template <class T, class U>
constexpr bool ge(T a, U b);

} // namespace cmp

Detailed Documentation

Global Functions

template <
    class T,
    class U,
    typename std::enable_if<((std::is_signed<T>::value||std::is_same<T, float16>::value)&&(std::is_signed<U>::value||std::is_same<U, float16>::value))||(std::is_unsigned<T>::value&&std::is_unsigned<U>::value)>::type \* = nullptr
    >
constexpr bool lt(
    T a,
    U b
    )

Compare two values (a < b) in safe way against lossy integer conversion.

Parameters:

T

Type of a value.

U

Type of b value.

a

Value a.

b

Value b.

Returns:

true if a less b otherwise false.

template <class T, class U>
constexpr bool gt(T a, U b)

Compare two values (a > b) in safe way against lossy integer conversion.

Parameters:

T

Type of a value.

U

Type of b value.

a

Value a.

b

Value b.

Returns:

true if a > b otherwise false.

template <class T, class U>
constexpr bool le(T a, U b)

Compare two values (a <= b) in safe way against lossy integer conversion.

Parameters:

T

Type of a value.

U

Type of b value.

a

Value a.

b

Value b.

Returns:

true if a <= b otherwise false.

template <class T, class U>
constexpr bool ge(T a, U b)

Compare two values (a >= b) in safe way against lossy integer conversion.

Parameters:

T

Type of a value.

U

Type of b value.

a

Value a.

b

Value b.

Returns:

true if a >= b otherwise false.