Detect simd headers in c++ instead of cmake
This commit is contained in:
@@ -14,6 +14,16 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#if !defined(USE_SIMD_FALLBACK) && defined(__has_include)
|
||||
#if __has_include("immintrin.h")
|
||||
#define HAS_AVX 1
|
||||
#include <immintrin.h>
|
||||
#elif __has_include("arm_neon.h")
|
||||
#define HAS_ARM_NEON 1
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "ConflictSet.h"
|
||||
#include "Internal.h"
|
||||
#include "LongestCommonPrefix.h"
|
||||
@@ -34,12 +44,6 @@ limitations under the License.
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#ifdef HAS_AVX
|
||||
#include <immintrin.h>
|
||||
#elif defined(HAS_ARM_NEON)
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#ifndef __SANITIZE_THREAD__
|
||||
#if defined(__has_feature)
|
||||
#if __has_feature(thread_sanitizer)
|
||||
|
Reference in New Issue
Block a user