http://doc.qt.digia.com/4.6/qtglobal.html#qreal-typedef
typedef qreal
Typedef for double on all platforms except for those using CPUs with ARM architectures. On ARM-based platforms, qreal is a typedef for float for performance reasons.
This still seems to be the case for 4.8 as well.
This lead to the following compile error on arm in kst:
/builddir/build/BUILD/kst-2.0.7/src/libkstapp/plotrenderitem.cpp:561:33: error: no matching function for call to 'qMin(double&, qreal)' y = qMin(y, plotItem()->yMax()); ^
If there is scientific type codes using qreal this might lead to some precision issues as well.
Is double really that much slower on arm?
On 08/01/2013 11:49 PM, Orion Poplawski wrote:
http://doc.qt.digia.com/4.6/qtglobal.html#qreal-typedef
typedef qreal
Typedef for double on all platforms except for those using CPUs with ARM architectures. On ARM-based platforms, qreal is a typedef for float for performance reasons.
This still seems to be the case for 4.8 as well.
This lead to the following compile error on arm in kst:
/builddir/build/BUILD/kst-2.0.7/src/libkstapp/plotrenderitem.cpp:561:33: error: no matching function for call to 'qMin(double&, qreal)' y = qMin(y, plotItem()->yMax()); ^
If there is scientific type codes using qreal this might lead to some precision issues as well.
Yes, we've had to patch quite a few packages to fix/workaround qreal!=double assumptions in code.
Is double really that much slower on arm?
Good question for https://lists.fedoraproject.org/mailman/listinfo/arm
(but, I assume the qt docs aren't lying and the answer is yes)
-- rex
Orion Poplawski wrote:
http://doc.qt.digia.com/4.6/qtglobal.html#qreal-typedef
typedef qreal
Typedef for double on all platforms except for those using CPUs with ARM architectures. On ARM-based platforms, qreal is a typedef for float for performance reasons.
This still seems to be the case for 4.8 as well.
This lead to the following compile error on arm in kst:
/builddir/build/BUILD/kst-2.0.7/src/libkstapp/plotrenderitem.cpp:561:33: error: no matching function for call to 'qMin(double&, qreal)' y = qMin(y, plotItem()->yMax()); ^
If there is scientific type codes using qreal this might lead to some precision issues as well.
Is double really that much slower on arm?
This mess is yet another reason why ARM is totally unsuitable as a primary architecture.
If your package is affected, I recommend to just: ExcludeArch: %{arm} and put it on the ExcludeArch tracker with a bug closed as WONTFIX or CANTFIX. It is just not practical to make scientific code work with ridiculously-low-precision floats.
As for why we can't just change this stupidity in Fedora, the thing is that there are a lot of hardcoded #ifdefs out there which assume that qreal is float on ARM, so we'd probably break just as many packages as we'd fix.
And this has been discussed over and over again upstream, they refused to fix this nonsense. So ARM will always be an unsupportable platform for anything Qt.
Kevin Kofler