Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qfloat16.h File Reference

(ab6c3f0145bfd296ba7661058bce825924f2f47e)

#include <QtCore/qcompare.h>
#include <QtCore/qglobal.h>
#include <QtCore/qhashfunctions.h>
#include <QtCore/qmath.h>
#include <QtCore/qnamespace.h>
#include <QtCore/qtconfigmacros.h>
#include <QtCore/qtformat_impl.h>
#include <QtCore/qtypes.h>
#include <limits>
#include <string.h>
#include <type_traits>
Include dependency graph for qfloat16.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  qfloat16
 \keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16 More...
struct  QtPrivate::QHypotType< qfloat16, qfloat16 >
struct  QtPrivate::QHypotType< R, qfloat16 >
struct  QtPrivate::QHypotType< qfloat16, R >
class  std::numeric_limits< QT_PREPEND_NAMESPACE(qfloat16)>
class  std::numeric_limits< const QT_PREPEND_NAMESPACE(qfloat16)>
class  std::numeric_limits< volatile QT_PREPEND_NAMESPACE(qfloat16)>
class  std::numeric_limits< const volatile QT_PREPEND_NAMESPACE(qfloat16)>

Namespaces

namespace  QtPrivate
namespace  std
 [33]

Macros

#define QF16_CONSTEXPR
#define QF16_PARTIALLY_ORDERED   Q_DECLARE_PARTIALLY_ORDERED
#define QF16_NUM(which, val)
#define QF16_MAKE_ARITH_OP_FP(FP, OP)
#define QF16_MAKE_ARITH_OP_EQ_FP(FP, OP_EQ, OP)
#define QF16_MAKE_ARITH_OP(FP)
#define QF16_MAKE_ARITH_OP_INT(OP)
#define QF16_MAKE_ORDER_OP_FP(FP)

Functions

 Q_DECLARE_TYPEINFO (qfloat16, Q_PRIMITIVE_TYPE)
Q_CORE_EXPORT void qFloatToFloat16 (qfloat16 *, const float *, qsizetype lengthlength) noexcept
Q_CORE_EXPORT void qFloatFromFloat16 (float *, const qfloat16 *, qsizetype lengthlength) noexcept
bool qIsInf (qfloat16 ff) noexcept
bool qIsNaN (qfloat16 ff) noexcept
bool qIsFinite (qfloat16 ff) noexcept
int qFpClassify (qfloat16 ff) noexcept
qfloat16 qSqrt (qfloat16 ff)
int qRound (qfloat16 d)
qint64 qRound64 (qfloat16 d)
bool qFuzzyCompare (qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull (qfloat16 ff) noexcept
bool qIsNull (qfloat16 ff)
int qIntCast (qfloat16 ff) noexcept
auto qHypot (qfloat16 xx, qfloat16 yy)
template<typename F, typename ... Fs>
auto qHypot (F firstfirst, Fs... rest)
template<typename T>
QtPrivate::QHypotType< T, qfloat16 >::type qHypot (T xx, qfloat16 yy)
template<typename T>
auto qHypot (qfloat16 xx, T yy)

Macro Definition Documentation

◆ QF16_CONSTEXPR

#define QF16_CONSTEXPR

Definition at line 69 of file qfloat16.h.

◆ QF16_MAKE_ARITH_OP

#define QF16_MAKE_ARITH_OP ( FP)
Value:
QF16_MAKE_ARITH_OP_FP(FP, -) \
QF16_MAKE_ARITH_OP_FP(FP, *) \
QF16_MAKE_ARITH_OP_FP(FP, /) \
QF16_MAKE_ARITH_OP_EQ_FP(FP, +=, +) \
QF16_MAKE_ARITH_OP_EQ_FP(FP, -=, -) \
QF16_MAKE_ARITH_OP_EQ_FP(FP, *=, *) \
QF16_MAKE_ARITH_OP_EQ_FP(FP, /=, /)
#define QF16_MAKE_ARITH_OP_FP(FP, OP)
Definition qfloat16.h:232

Definition at line 240 of file qfloat16.h.

◆ QF16_MAKE_ARITH_OP_EQ_FP

#define QF16_MAKE_ARITH_OP_EQ_FP ( FP,
OP_EQ,
OP )
Value:
friend QF16_CONSTEXPR inline qfloat16 &operator OP_EQ(qfloat16& lhs, FP rhs) noexcept \
{ lhs = qfloat16(NearestFloat(static_cast<FP>(lhs) OP rhs)); return lhs; }
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Definition qfloat16.h:62
constexpr qfloat16() noexcept
Definition qfloat16.h:97
#define OP(a, b)
#define QF16_CONSTEXPR
Definition qfloat16.h:69

Definition at line 237 of file qfloat16.h.

◆ QF16_MAKE_ARITH_OP_FP

#define QF16_MAKE_ARITH_OP_FP ( FP,
OP )
Value:
friend QF16_CONSTEXPR inline FP operator OP(qfloat16 lhs, FP rhs) noexcept \
{ return static_cast<FP>(lhs) OP rhs; } \
friend QF16_CONSTEXPR inline FP operator OP(FP lhs, qfloat16 rhs) noexcept \
{ return lhs OP static_cast<FP>(rhs); }

Definition at line 232 of file qfloat16.h.

◆ QF16_MAKE_ARITH_OP_INT

#define QF16_MAKE_ARITH_OP_INT ( OP)
Value:
friend QF16_CONSTEXPR inline double operator OP(qfloat16 lhs, int rhs) noexcept \
{ return static_cast<double>(lhs) OP rhs; } \
friend QF16_CONSTEXPR inline double operator OP(int lhs, qfloat16 rhs) noexcept \
{ return lhs OP static_cast<double>(rhs); }

Definition at line 259 of file qfloat16.h.

◆ QF16_MAKE_ORDER_OP_FP

#define QF16_MAKE_ORDER_OP_FP ( FP)
Value:
friend QF16_CONSTEXPR bool comparesEqual(const qfloat16 &lhs, FP rhs) noexcept \
{ return static_cast<FP>(lhs) == rhs; } \
friend QF16_CONSTEXPR \
Qt::partial_ordering compareThreeWay(const qfloat16 &lhs, FP rhs) noexcept \
{ return Qt::compareThreeWay(static_cast<FP>(lhs), rhs); } \
QF16_PARTIALLY_ORDERED(qfloat16, FP)
constexpr Qt::strong_ordering compareThreeWay(LeftInt lhs, RightInt rhs) noexcept
bool comparesEqual(const QDir &lhs, const QDir &rhs)
Definition qdir.cpp:1974
Qt::weak_ordering compareThreeWay(const QUrl &lhs, const QUrl &rhs)
Definition qurl.cpp:3097

Definition at line 280 of file qfloat16.h.

◆ QF16_NUM

#define QF16_NUM ( which,
val )
Value:
static constexpr qfloat16 _num_ ## which () noexcept \
{ return qfloat16(Wrap(val)); }
GLuint GLfloat * val

Definition at line 146 of file qfloat16.h.

◆ QF16_PARTIALLY_ORDERED

#define QF16_PARTIALLY_ORDERED   Q_DECLARE_PARTIALLY_ORDERED

Definition at line 70 of file qfloat16.h.

Function Documentation

◆ Q_DECLARE_TYPEINFO()

Q_DECLARE_TYPEINFO ( qfloat16 ,
Q_PRIMITIVE_TYPE  )

◆ qFloatFromFloat16()

Q_CORE_EXPORT void qFloatFromFloat16 ( float * ,
const qfloat16 * ,
qsizetype length )
related

◆ qFloatToFloat16()

Q_CORE_EXPORT void qFloatToFloat16 ( qfloat16 * ,
const float * ,
qsizetype length )
related

Referenced by convertParticleData().

Here is the caller graph for this function:

◆ qFpClassify()

int qFpClassify ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 340 of file qfloat16.h.

◆ qFuzzyCompare()

bool qFuzzyCompare ( qfloat16 p1,
qfloat16 p2 )
inlinenodiscardnoexcept

Definition at line 387 of file qfloat16.h.

◆ qFuzzyIsNull()

bool qFuzzyIsNull ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 403 of file qfloat16.h.

◆ qHypot() [1/4]

template<typename F, typename ... Fs>
auto qHypot ( F first,
Fs... rest )

Definition at line 137 of file qmath.h.

◆ qHypot() [2/4]

auto qHypot ( qfloat16 x,
qfloat16 y )
inline

Definition at line 496 of file qfloat16.h.

◆ qHypot() [3/4]

template<typename T>
auto qHypot ( qfloat16 x,
T y )

Definition at line 524 of file qfloat16.h.

◆ qHypot() [4/4]

template<typename T>
QtPrivate::QHypotType< T, qfloat16 >::type qHypot ( T x,
qfloat16 y )

Definition at line 509 of file qfloat16.h.

◆ qIntCast()

int qIntCast ( qfloat16 f)
inlinenoexcept

Definition at line 413 of file qfloat16.h.

◆ qIsFinite()

bool qIsFinite ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 339 of file qfloat16.h.

References qfloat16::isFinite().

Here is the call graph for this function:

◆ qIsInf()

bool qIsInf ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 337 of file qfloat16.h.

References qfloat16::isInf().

Here is the call graph for this function:

◆ qIsNaN()

bool qIsNaN ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 338 of file qfloat16.h.

References qfloat16::isNaN().

Here is the call graph for this function:

◆ qIsNull()

bool qIsNull ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 408 of file qfloat16.h.

◆ qRound()

int qRound ( qfloat16 d)
inlinenodiscard

Definition at line 381 of file qfloat16.h.

◆ qRound64()

qint64 qRound64 ( qfloat16 d)
inlinenodiscard

Definition at line 384 of file qfloat16.h.

◆ qSqrt()

qfloat16 qSqrt ( qfloat16 f)
inlinenodiscard

Definition at line 343 of file qfloat16.h.