Guest User

FastNoiseSIMD_config.h

a guest
Mar 5th, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. #ifndef FASTNOISE_SIMD_CONFIG_H
  2. #define FASTNOISE_SIMD_CONFIG_H
  3.  
  4. #pragma once
  5.  
  6. #if defined(__arm__) || defined(__aarch64__)
  7. #define FN_ARM
  8. //#define FN_IOS
  9. /* #undef FN_COMPILE_NEON */
  10. #else
  11.  
  12. // Comment out lines to not compile for certain instruction sets
  13. #define FN_COMPILE_SSE2
  14. #define FN_COMPILE_SSE41
  15.  
  16. // To compile AVX2 set C++ code generation to use /arch:AVX(2) on FastNoiseSIMD_avx2.cpp
  17. // Note: This does not break support for pre AVX CPUs, AVX code is only run if support is detected
  18. #define FN_COMPILE_AVX2
  19.  
  20. // Only the latest compilers will support this
  21. /* #undef FN_COMPILE_AVX512 */
  22.  
  23. // Using FMA instructions with AVX(51)2/NEON provides a small performance increase but can cause
  24. // minute variations in noise output compared to other SIMD levels due to higher calculation precision
  25. // Intel compiler will always generate FMA instructions, use /Qfma- or -no-fma to disable
  26. #define FN_USE_FMA
  27. #endif
  28.  
  29. // Using aligned sets of memory for float arrays allows faster storing of SIMD data
  30. // Comment out to allow unaligned float arrays to be used as sets
  31. #define FN_ALIGNED_SETS
  32.  
  33. #endif
Advertisement
Add Comment
Please, Sign In to add comment