x86_features.h 716 B

12345678910111213141516171819202122232425262728
  1. /* x86_features.h -- check for CPU features
  2. * Copyright (C) 2013 Intel Corporation Jim Kukunas
  3. * For conditions of distribution and use, see copyright notice in zlib.h
  4. */
  5. #ifndef X86_FEATURES_H_
  6. #define X86_FEATURES_H_
  7. struct x86_cpu_features {
  8. int has_avx2;
  9. int has_avx512f;
  10. int has_avx512dq;
  11. int has_avx512bw;
  12. int has_avx512vl;
  13. int has_avx512_common; // Enabled when AVX512(F,DQ,BW,VL) are all enabled.
  14. int has_avx512vnni;
  15. int has_sse2;
  16. int has_ssse3;
  17. int has_sse42;
  18. int has_pclmulqdq;
  19. int has_vpclmulqdq;
  20. int has_os_save_ymm;
  21. int has_os_save_zmm;
  22. };
  23. void Z_INTERNAL x86_check_features(struct x86_cpu_features *features);
  24. #endif /* X86_FEATURES_H_ */