Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT's math library performance on Ios/Android
Forum Updated to NodeBB v4.3 + New Features

QT's math library performance on Ios/Android

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kloveridge
    wrote on last edited by
    #1

    Just wondering if QT's math library for both ios and Android is written to take advantage of the hardware's math capabilities. We know that a software implemented math library is about 10 times slower on IOS as compared to Apple's library (GLKMath) written to take advantage of the ARM processor. This is important to us as a 3D developer.

    Thanks in advance.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      That's the kind of question you should ask on the mailing list. You'll find there Qt's developers/maintainers (this forum is more user oriented)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • X Offline
        X Offline
        Xander84
        wrote on last edited by
        #3

        Hi, what math lib are you talking about?
        QtMath has just some function wrappers for the default math.h stuff and maybe qFastSin and qFastCos, so I have no idea if the default math.h function take advantage of the ARM CPU or any GPU features, possibly not :D

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kloveridge
          wrote on last edited by
          #4

          I am looking at mainly 3D math functions such as multiplying matrices, vector manipulation (vec2, 3, and 4), Quaterenions.

          1 Reply Last reply
          0
          • X Offline
            X Offline
            Xander84
            wrote on last edited by
            #5

            I think they are just using the default math functions, you can just look at the source code and see for yourself :)
            e.g. if you installed it the source code is available at Qt/5.2.1/Src/qtbase/src/gui/math3d
            @
            void QVector3D::normalize()
            {
            // Need some extra precision if the length is very small.
            double len = double(xp) * double(xp) +
            double(yp) * double(yp) +
            double(zp) * double(zp);
            if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
            return;

            len = sqrt(len);
            
            xp = float(double(xp) / len);
            yp = float(double(yp) / len);
            zp = float(double(zp) / len);
            

            }
            @
            just using the default sqrt form math.h

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved