heads up - Qt qreal difference on ARM

Orion Poplawski orion at cora.nwra.com
Fri Aug 2 04:49:12 UTC 2013


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?

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion at cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com


More information about the kde mailing list