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. SSE4 Compilation
QtWS25 Last Chance

SSE4 Compilation

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 2.3k Views
  • 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.
  • A Offline
    A Offline
    alecs26
    wrote on last edited by
    #1

    Hello,

    I need to compile my program using either AVX or SSE4 instructions for a library I am using (dlib).
    I want my program to run on different computers so I would prefer to use SSE4 since its more general (some computers don't have AVX).

    I am not sure exactly what each line does but with these instructions my program was running well:

    QMAKE_CXXFLAGS_RELEASE += -mavx
    QMAKE_CXXFLAGS_RELEASE -= -O2
    QMAKE_CXXFLAGS_RELEASE += -O3
    QMAKE_LFLAGS_RELEASE -= -O1
    

    I guess "-mavx" was to enable AVX instructions. However, I want to use SSE4 instructions but I can't make it work. What should I do ?

    I am using mingw 32 bit on Windows 10.

    Thank you so much,

    Alex

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

      Hi,

      Isn't the -msseXXXwhat you are looking for ? See here.

      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
      1
      • A Offline
        A Offline
        alecs26
        wrote on last edited by
        #3

        Yes, I guess I should use -msse4. It just that when I try that my program crashes. But I think that it comes from one of my library. I just thought that I did something wrong. Thanks again.

        Alex

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

          Then you should check exactly what parameters were used to build that library.

          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

          • Login

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