Skip to content

Commit

Permalink
apps/linear_algebra/benchmarks/macros.h: don't forget SSE guard (#6471
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI authored and steven-johnson committed Dec 7, 2021
1 parent fb39d7e commit 7c6e92c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/linear_algebra/benchmarks/macros.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#include "halide_benchmark.h"

#ifdef ENABLE_FTZ_DAZ
#if defined(__i386__) || defined(__x86_64__)
#if (defined(__i386__) || defined(__x86_64__)) && defined(__SSE__)
#include <pmmintrin.h>
#include <xmmintrin.h>
#endif // defined(__i386__) || defined(__x86_64__)
#endif // (defined(__i386__) || defined(__x86_64__)) && defined(__SSE__)
#endif

inline void set_math_flags() {
#ifdef ENABLE_FTZ_DAZ

#if defined(__i386__) || defined(__x86_64__)
#if (defined(__i386__) || defined(__x86_64__)) && defined(__SSE__)
// Flush denormals to zero (the FTZ flag).
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
// Interpret denormal inputs as zero (the DAZ flag).
Expand Down

0 comments on commit 7c6e92c

Please sign in to comment.