avx512.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2009-2021 Intel Corporation
  2. // SPDX-License-Identifier: Apache-2.0
  3. #pragma once
  4. #include "../sys/platform.h"
  5. #include "../sys/intrinsics.h"
  6. #include "../math/constants.h"
  7. #include "../sys/alloc.h"
  8. #include "varying.h"
  9. #include "vboolf16_avx512.h"
  10. #include "vint16_avx512.h"
  11. #include "vuint16_avx512.h"
  12. #include "vfloat16_avx512.h"
  13. #include "vboold8_avx512.h"
  14. #include "vllong8_avx512.h"
  15. #include "vdouble8_avx512.h"
  16. namespace embree
  17. {
  18. ////////////////////////////////////////////////////////////////////////////////
  19. /// Prefetching
  20. ////////////////////////////////////////////////////////////////////////////////
  21. #define PFHINT_L1 0
  22. #define PFHINT_L2 1
  23. #define PFHINT_NT 2
  24. template<const unsigned int mode>
  25. __forceinline void prefetch(const void * __restrict__ const m)
  26. {
  27. if (mode == PFHINT_L1)
  28. _mm_prefetch((const char*)m,_MM_HINT_T0);
  29. else if (mode == PFHINT_L2)
  30. _mm_prefetch((const char*)m,_MM_HINT_T1);
  31. else if (mode == PFHINT_NT)
  32. _mm_prefetch((const char*)m,_MM_HINT_NTA);
  33. }
  34. }