Skip to content

Commit

Permalink
Macro for sub PPC flavors
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Aug 30, 2024
1 parent fbc6d2c commit 6fdf321
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/spy/simd/ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,39 @@
#if !defined(SPY_SIMD_DETECTED) && defined(__VSX__)
# define SPY_SIMD_IS_PPC_VSX
# if defined(_ARCH_PWR10)
# define SPY_SIMD_IS_PPC_VSX_3_01
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_3_01_
# elif defined(_ARCH_PWR9)
# define SPY_SIMD_IS_PPC_VSX_3_00
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_3_00_
# elif defined(_ARCH_PWR8)
# define SPY_SIMD_IS_PPC_VSX_2_07
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_2_07_
# elif defined(_ARCH_PWR7)
# define SPY_SIMD_IS_PPC_VSX_2_06
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_2_06_
# endif
#endif

#if !defined(SPY_SIMD_DETECTED) && (defined(__ALTIVEC__) || defined(__VEC__))
# define SPY_SIMD_IS_PPC_VMX
# if defined(_ARCH_PWR10)
# define SPY_SIMD_IS_PPC_VMX_3_01
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_3_01_
# elif defined(_ARCH_PWR9)
# define SPY_SIMD_IS_PPC_VMX_3_00
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_3_00_
# elif defined(_ARCH_PWR8)
# define SPY_SIMD_IS_PPC_VMX_2_07
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_07_
# elif defined(_ARCH_PWR7)
# define SPY_SIMD_IS_PPC_VMX_2_06
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_06_
# elif defined(_ARCH_PWR6)
# define SPY_SIMD_IS_PPC_VMX_2_05
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_05_
# elif defined(_ARCH_PWR5)
# define SPY_SIMD_IS_PPC_VMX_2_03
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_03_
# endif
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_
Expand Down
10 changes: 10 additions & 0 deletions standalone/spy/spy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,28 +950,38 @@ namespace avx512
#if !defined(SPY_SIMD_DETECTED) && defined(__VSX__)
# define SPY_SIMD_IS_PPC_VSX
# if defined(_ARCH_PWR10)
# define SPY_SIMD_IS_PPC_VSX_3_01
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_3_01_
# elif defined(_ARCH_PWR9)
# define SPY_SIMD_IS_PPC_VSX_3_00
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_3_00_
# elif defined(_ARCH_PWR8)
# define SPY_SIMD_IS_PPC_VSX_2_07
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_2_07_
# elif defined(_ARCH_PWR7)
# define SPY_SIMD_IS_PPC_VSX_2_06
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_2_06_
# endif
#endif
#if !defined(SPY_SIMD_DETECTED) && (defined(__ALTIVEC__) || defined(__VEC__))
# define SPY_SIMD_IS_PPC_VMX
# if defined(_ARCH_PWR10)
# define SPY_SIMD_IS_PPC_VMX_3_01
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_3_01_
# elif defined(_ARCH_PWR9)
# define SPY_SIMD_IS_PPC_VMX_3_00
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_3_00_
# elif defined(_ARCH_PWR8)
# define SPY_SIMD_IS_PPC_VMX_2_07
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_07_
# elif defined(_ARCH_PWR7)
# define SPY_SIMD_IS_PPC_VMX_2_06
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_06_
# elif defined(_ARCH_PWR6)
# define SPY_SIMD_IS_PPC_VMX_2_05
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_05_
# elif defined(_ARCH_PWR5)
# define SPY_SIMD_IS_PPC_VMX_2_03
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_2_03_
# endif
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::vmx_
Expand Down

0 comments on commit 6fdf321

Please sign in to comment.