Add denormals stripping to the main thread as well as workerthreads
Conflicts: src/core/main.cpp
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MIXER_WORKER_THREAD_H
|
||||
#define _MIXER_WORKER_THREAD_H
|
||||
#ifndef MIXER_WORKER_THREAD_H
|
||||
#define MIXER_WORKER_THREAD_H
|
||||
|
||||
#include <QtCore/QAtomicPointer>
|
||||
#include <QtCore/QThread>
|
||||
|
||||
@@ -27,6 +27,14 @@
|
||||
#include "lmmsversion.h"
|
||||
#include "versioninfo.h"
|
||||
|
||||
// denormals stripping
|
||||
#ifdef __SSE__
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE3__
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QLocale>
|
||||
@@ -92,6 +100,16 @@ int main( int argc, char * * argv )
|
||||
// intialize RNG
|
||||
srand( getpid() + time( 0 ) );
|
||||
|
||||
// set denormal protection for this thread
|
||||
#ifdef __SSE3__
|
||||
/* DAZ flag */
|
||||
_MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON );
|
||||
#endif
|
||||
#ifdef __SSE__
|
||||
/* FTZ flag */
|
||||
_MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON );
|
||||
#endif
|
||||
|
||||
bool core_only = false;
|
||||
bool fullscreen = true;
|
||||
bool exit_after_import = false;
|
||||
|
||||
Reference in New Issue
Block a user