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

(799608699350fef4f05632191783f969cfc62606)

#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_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_CONSTEXPR
#define QF16_PARTIALLY_ORDERED   Q_DECLARE_PARTIALLY_ORDERED
#define QF16_MAKE_ORDER_OP_FP(FP)

Functions

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

Macro Definition Documentation

◆ QF16_CONSTEXPR

#define QF16_CONSTEXPR

Definition at line 209 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:168

Definition at line 174 of file qfloat16.h.

◆ QF16_MAKE_ARITH_OP_EQ_FP

#define QF16_MAKE_ARITH_OP_EQ_FP ( FP,
OP_EQ,
OP )
Value:
friend 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:48
#define OP(a, b)

Definition at line 171 of file qfloat16.h.

◆ QF16_MAKE_ARITH_OP_FP

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

Definition at line 168 of file qfloat16.h.

◆ QF16_MAKE_ARITH_OP_INT

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

Definition at line 193 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:1936
#define QF16_CONSTEXPR
Definition qfloat16.h:209
Qt::weak_ordering compareThreeWay(const QUrl &lhs, const QUrl &rhs)
Definition qurl.cpp:3052

Definition at line 220 of file qfloat16.h.

◆ QF16_PARTIALLY_ORDERED

#define QF16_PARTIALLY_ORDERED   Q_DECLARE_PARTIALLY_ORDERED

Definition at line 210 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 280 of file qfloat16.h.

◆ qFuzzyCompare()

bool qFuzzyCompare ( qfloat16 p1,
qfloat16 p2 )
inlinenodiscardnoexcept

Definition at line 327 of file qfloat16.h.

◆ qFuzzyIsNull()

bool qFuzzyIsNull ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 343 of file qfloat16.h.

◆ qHypot() [1/4]

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

Definition at line 136 of file qmath.h.

◆ qHypot() [2/4]

auto qHypot ( qfloat16 x,
qfloat16 y )
inline

Definition at line 437 of file qfloat16.h.

◆ qHypot() [3/4]

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

Definition at line 457 of file qfloat16.h.

◆ qHypot() [4/4]

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

Definition at line 450 of file qfloat16.h.

◆ qIntCast()

int qIntCast ( qfloat16 f)
inlinenoexcept

Definition at line 353 of file qfloat16.h.

◆ qIsFinite()

bool qIsFinite ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 279 of file qfloat16.h.

References qfloat16::isFinite().

Here is the call graph for this function:

◆ qIsInf()

bool qIsInf ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 277 of file qfloat16.h.

References qfloat16::isInf().

Here is the call graph for this function:

◆ qIsNaN()

bool qIsNaN ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 278 of file qfloat16.h.

References qfloat16::isNaN().

Here is the call graph for this function:

◆ qIsNull()

bool qIsNull ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 348 of file qfloat16.h.

◆ qRound()

int qRound ( qfloat16 d)
inlinenodiscard

Definition at line 321 of file qfloat16.h.

◆ qRound64()

qint64 qRound64 ( qfloat16 d)
inlinenodiscard

Definition at line 324 of file qfloat16.h.

◆ qSqrt()

qfloat16 qSqrt ( qfloat16 f)
inlinenodiscard

Definition at line 283 of file qfloat16.h.