summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qfloat16.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Document the new qfloat16 functions with the other qfloat16 functionsAllan Sandfeld Jensen2018-01-241-0/+2
| | | | | Change-Id: I82d3fcda44a9a49d9027d865f8ed200134d0f79e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-12/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
* | qfloat16_f16c.c: inline in qfloat16.cpp if F16C is permitted in thereThiago Macieira2017-12-151-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is going to be the most common scenario for GCC: all recent versions allow compiling F16C code in the same source, thus generating better code. MSVC is excluded unless AVX is already turned on by the user in the mkspec file, because it fails to use the VEX-prefixed instructions for everything else, printing a warning that it knows it should have done so. ICC is excluded because it's known to generate invalid code when using the F16C intrinsics unless F16C is turned explicitly on. Clang is excluded because it runs into an internal error compiling this code unless F16C is turned explicitly on. Change-Id: I57a1bd6e0c194530b732fffd14f58de6a46f0de1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix qFloatFromFloat16_fast on NEONAllan Sandfeld Jensen2017-11-231-1/+1
| | | | | | | | | | | | | | | | An over-correction snuck in at some point. Change-Id: Ib67c4f6ecf8e6e244a0598c025a7cb7c15401070 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add functions for fast bulk conversion of qfloat16Allan Sandfeld Jensen2017-11-211-0/+85
|/ | | | | | | | | | | | | | | | Both ARM and x86 can convert fp16 much faster in bulk than one at a time. This also enables hardware accelerated conversion on x86, when F16C isn't unconditionally available at compile time. This code is implemented in C to ensure that there's no leakage of inline symbols from the .obj file that was compiled by Visual Studio with AVX support. Unfortunately, simd.prf uses $(CXX) instead of $(CC) for all its sources, which means the file gets interpreted as C++ by g++, clang++ and icpc. Those compilers at least don't leak any symbols. Done-with: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I9d26d99e83392861fb09564e0e8e8d76cd8483b3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* improve docs for qfloat16Glen Mabey2017-05-171-1/+5
| | | | | | | | | added a proper \title, \ingroup, and \brief Change-Id: I85ac845d8e5415793e6de02cd653c60e2712faa5 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Glen Mabey <Glen.Mabey@swri.org> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Centralize the check that the floating point implementation follows IEEE754Giuseppe D'Angelo2017-04-211-18/+0
| | | | | | | | | | | | | C++ does not specify which kind of floating point implementation is being used. The C Standard doesn't either, but it includes a normative reference for implementations adoping it (ISO/IEC 9899:2011 Annex F). There are a few existing checks in qfloat16.cpp; move them to qglobal.cpp (next to the other, similar checks), and improve them by actually checking that the radix used for floating point numbers is 2. Change-Id: I704a3a8efeb51014b3be23fb236654d647a6f44f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix is_iec559 assert on GHS compilerKimmo Ollila2017-02-151-0/+13
| | | | | | | | | | | GHS compiler is not fully compliant with iec559. Therefore we need to replace is_iec559 assertion with separate checks to build quint16. Change-Id: I88c57e394b8d4e7899ee7d4a13cbfbac9436b2fc Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* New qfloat16 classGlen Mabey2017-01-311-0/+117
This constitutes a fairly complete submission of an entirely new floating point type which conforms to IEEE 754 as a 16-bit storage class. Conversion between qfloat16 and float is currently performed through a sequence of lookup tables. Global-level functions qRound(), qRound64(), qFuzzyCompare(), qFuzzyIsNull(), and qIsNull() each with a qfloat16 parameter have been included for completeness. [ChangeLog][QtCore] Added new qfloat16 class. Change-Id: Ia52eb27846965c14f8140c00faf5ba33c9443976 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>