Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Vectorization support
Forum Updated to NodeBB v4.3 + New Features

Vectorization support

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 319 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.
  • Q Offline
    Q Offline
    Q139
    wrote on last edited by Q139
    #1

    Does mingw compiler that comes prepacked with qt offline installer support vectorization well?
    What compiler flags should i enable to get maximal speeds on i7-5930k cpu , Haswell E ?
    No other cpu models will run the application.
    Currently using QMAKE_CXXFLAGS_RELASE *= -O3 optimization flag
    Most intense parts of code run under #pragma omp parralel for

    1 Reply Last reply
    0
    • T Offline
      T Offline
      ThePhysicist
      wrote on last edited by
      #2

      These flags work under gcc, so they should work under mingw as well.

      -ffast-math
      -ftree_vectorize (default on -O3)
      -march=native
      

      However, the compiler can only do so much. When it comes to optimisation, it's paramount to well structured code that can be optimised and can be vectorised. Especially branching in for loops is a major point that creates bottle necks and might disrupt vectorisation. Without having a look at your code it's difficult to give further advice.

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Q139
        wrote on last edited by Q139
        #3
        CONFIG+= -O3 -ffast-math -march=native
        

        With above open mp for loop function average runtime from 37.8s to 41.2.

        For some reason -O3 -march=native without -ffast-math works better.

        Is there any way to imorove performance further with compiler?
        I don't care if it compiles a week.

        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