Skip to content

Commit

Permalink
Putting some protection around header and other line (related to arch…
Browse files Browse the repository at this point in the history
…itechture intrinsics for denormalized floats) so it doesn't barf on M1 Macs. @JunoRavin will test.
  • Loading branch information
manauref committed Nov 21, 2023
1 parent efd1a95 commit b066cc9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gkyl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@

// Compiler specific includes
#if defined(__clang__)
// nothing to include
#if defined(__arm__) || defined(__arm64__)
// nothing for m1 chip
#else
// include intrinsics header for intel chip.
# include <xmmintrin.h>
#endif

#elif defined(__powerpc__)
// nothing to include
#elif defined(__GNUC__) || defined(__GNUG__)
Expand Down Expand Up @@ -127,8 +132,12 @@ main(int argc, char **argv) {
// code. Otherwise, the code become horribly slow in some rare (but
// not impossible to reproduce) situations.
#if defined(__GNUC__) || defined(__GNUG__)
#if defined(__arm__) || defined(__arm64__)
// nothing for Apple m1 chip
#else
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
#endif
#endif

#if defined(__clang__)
# if defined(__APPLE__)
Expand Down

0 comments on commit b066cc9

Please sign in to comment.