sse-intrin.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /******************************************************************************
  2. Copyright (C) 2019 by Peter Geis <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ******************************************************************************/
  14. #pragma once
  15. #if NEEDS_SIMDE
  16. #include "simde/sse2.h"
  17. #define __m128 simde__m128
  18. #define _mm_setzero_ps simde_mm_setzero_ps
  19. #define _mm_set_ps simde_mm_set_ps
  20. #define _mm_add_ps simde_mm_add_ps
  21. #define _mm_sub_ps simde_mm_sub_ps
  22. #define _mm_mul_ps simde_mm_mul_ps
  23. #define _mm_div_ps simde_mm_div_ps
  24. #define _mm_set1_ps simde_mm_set1_ps
  25. #define _mm_movehl_ps simde_mm_movehl_ps
  26. #define _mm_shuffle_ps simde_mm_shuffle_ps
  27. #define _mm_min_ps simde_mm_min_ps
  28. #define _mm_max_ps simde_mm_max_ps
  29. #define _mm_movelh_ps simde_mm_movelh_ps
  30. #define _mm_unpacklo_ps simde_mm_unpacklo_ps
  31. #define _mm_unpackhi_ps simde_mm_unpackhi_ps
  32. #define _mm_load_ps simde_mm_load_ps
  33. #define _mm_andnot_ps simde_mm_andnot_ps
  34. #define _mm_storeu_ps simde_mm_storeu_ps
  35. #define _mm_loadu_ps simde_mm_loadu_ps
  36. #define __m128i simde__m128i
  37. #define _mm_set1_epi32 simde_mm_set1_epi32
  38. #define _mm_set1_epi16 simde_mm_set1_epi16
  39. #define _mm_load_si128 simde_mm_load_si128
  40. #define _mm_packs_epi32 simde_mm_packs_epi32
  41. #define _mm_srli_si128 simde_mm_srli_si128
  42. #define _mm_and_si128 simde_mm_and_si128
  43. #define _mm_packus_epi16 simde_mm_packus_epi16
  44. #define _mm_add_epi64 simde_mm_add_epi64
  45. #define _mm_shuffle_epi32 simde_mm_shuffle_epi32
  46. #define _mm_srai_epi16 simde_mm_srai_epi16
  47. #define _mm_shufflelo_epi16 simde_mm_shufflelo_epi16
  48. #define _mm_storeu_si128 simde_mm_storeu_si128
  49. #define _MM_SHUFFLE SIMDE_MM_SHUFFLE
  50. #define _MM_TRANSPOSE4_PS SIMDE_MM_TRANSPOSE4_PS
  51. #else
  52. #include <xmmintrin.h>
  53. #include <emmintrin.h>
  54. #endif