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,
-msseXXXwhat you are looking for ? See here.
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.
Then you should check exactly what parameters were used to build that library.