Skip to content

Commit

Permalink
[supernova] use boost.predef for checking SIMD
Browse files Browse the repository at this point in the history
this fixes denormals on Windows
  • Loading branch information
jrsurge committed Jan 4, 2020
1 parent 18e51ef commit ff2c03d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/supernova/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
# include <CoreAudio/CoreAudioTypes.h>
#endif

#include <boost/predef/hardware.h>

namespace nova {

class nova_server* instance = nullptr;
Expand Down Expand Up @@ -207,7 +209,7 @@ static void name_current_thread(int thread_index) {
}

static void set_daz_ftz(void) {
#ifdef __SSE__
#if BOOST_HW_SIMD_X86 >= BOOST_X86_SSE_VERSION
/* denormal handling */
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
_mm_setcsr(_mm_getcsr() | 0x40);
Expand Down

0 comments on commit ff2c03d

Please sign in to comment.