#.rst: # FindAVX2 # -------- # # Finds AVX2 support # # This module can be used to detect AVX2 support in a C compiler. If # the compiler supports AVX2, the flags required to compile with # AVX2 support are returned in variables for the different languages. # The variables may be empty if the compiler does not need a special # flag to support AVX2. # # The following variables are set: # # :: # # AVX2_C_FLAGS - flags to add to the C compiler for AVX2 support # AVX2_FOUND - true if AVX2 is detected # #============================================================================= set(_AVX2_REQUIRED_VARS) set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) set(CMAKE_REQUIRED_QUIET ${AVX2_FIND_QUIETLY}) # sample AVX2 source code to test set(AVX2_C_TEST_SOURCE " #include void parasail_memset___m256i(__m256i *b, __m256i c, size_t len) { size_t i; for (i=0; i