Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Compiler Settings

Jordan Peck edited this page Oct 12, 2018 · 2 revisions

Visual Studio - MSVC

Change the enhanced instruction set (File Properties -> C/C++ -> Code Generation -> Enable Enhanced Instruction Set) for the following files:

  • FastNoiseSIMD_sse2.cpp: /arch:SSE2
  • FastNoiseSIMD_sse41.cpp: /arch:SSE2
  • FastNoiseSIMD_avx2.cpp: /arch:AVX2 or /arch:AVX
  • FastNoiseSIMD_avx512.cpp: /arch:AVX2 or /arch:AVX

For the above files disable whole program optimization (File Properties -> C/C++ -> Optimization -> Whole Program Optimization) since this can lead to the compiler inlining unsupported intrinsics into unmanaged locations.

G++ & Clang

Use compiler setting -std=c++11, and the following for individual files:

  • FastNoiseSIMD_sse2.cpp: -msse2
  • FastNoiseSIMD_sse41.cpp: -msse4.1
  • FastNoiseSIMD_avx2.cpp: -mavx2
  • FastNoiseSIMD_avx512.cpp: -mavx512f

AVX2 Support

  • Visual Studio 2010+
  • G++/GCC 4.7+
  • Clang/LLVM 3.1+

If AVX2 in unsupported on your compiler, disable AVX2 compilation by commenting out "#define FN_COMPILE_AVX2" in FastNoiseSIMD.h

Clone this wiki locally