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

(44124a83c60fe2c49a1a8fc37df8413ef2652b3e)

#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_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 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 62 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:206

Definition at line 214 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:57
#define OP(a, b)
#define QF16_CONSTEXPR
Definition qfloat16.h:62

Definition at line 211 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 206 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 233 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
Qt::weak_ordering compareThreeWay(const QUrl &lhs, const QUrl &rhs)
Definition qurl.cpp:3051

Definition at line 254 of file qfloat16.h.

◆ QF16_PARTIALLY_ORDERED

#define QF16_PARTIALLY_ORDERED   Q_DECLARE_PARTIALLY_ORDERED

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

◆ qFuzzyCompare()

bool qFuzzyCompare ( qfloat16 p1,
qfloat16 p2 )
inlinenodiscardnoexcept

Definition at line 361 of file qfloat16.h.

◆ qFuzzyIsNull()

bool qFuzzyIsNull ( qfloat16 f)
inlinenodiscardnoexcept

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

◆ qHypot() [3/4]

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

Definition at line 498 of file qfloat16.h.

◆ qHypot() [4/4]

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

Definition at line 483 of file qfloat16.h.

◆ qIntCast()

int qIntCast ( qfloat16 f)
inlinenoexcept

Definition at line 387 of file qfloat16.h.

◆ qIsFinite()

bool qIsFinite ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 313 of file qfloat16.h.

References qfloat16::isFinite().

Here is the call graph for this function:

◆ qIsInf()

bool qIsInf ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 311 of file qfloat16.h.

References qfloat16::isInf().

Here is the call graph for this function:

◆ qIsNaN()

bool qIsNaN ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 312 of file qfloat16.h.

References qfloat16::isNaN().

Here is the call graph for this function:

◆ qIsNull()

bool qIsNull ( qfloat16 f)
inlinenodiscardnoexcept

Definition at line 382 of file qfloat16.h.

◆ qRound()

int qRound ( qfloat16 d)
inlinenodiscard

Definition at line 355 of file qfloat16.h.

◆ qRound64()

qint64 qRound64 ( qfloat16 d)
inlinenodiscard

Definition at line 358 of file qfloat16.h.

◆ qSqrt()

qfloat16 qSqrt ( qfloat16 f)
inlinenodiscard

Definition at line 317 of file qfloat16.h.