--- a/Eigen/src/Geometry/arch/Geometry_SSE.h +++ b/Eigen/src/Geometry/arch/Geometry_SSE.h @@ -33,13 +33,14 @@ Packet4f b = be.template packet(0); Packet4f s1 = pmul(vec4f_swizzle1(a,1,2,0,2),vec4f_swizzle1(b,2,0,1,2)); Packet4f s2 = pmul(vec4f_swizzle1(a,3,3,3,1),vec4f_swizzle1(b,0,1,2,1)); - pstoret( - &res.x(), - padd(psub(pmul(a,vec4f_swizzle1(b,3,3,3,3)), - pmul(vec4f_swizzle1(a,2,0,1,0), - vec4f_swizzle1(b,1,2,0,0))), - pxor(mask,padd(s1,s2)))); - + pstoret( + &res.x(), + padd( + psub(pmul(a, vec4f_swizzle1(b, 3, 3, 3, 3)), + pmul(vec4f_swizzle1(a, 2, 0, 1, 0), + vec4f_swizzle1(b, 1, 2, 0, 0))), + pxor(mask, padd(s1, s2)))); + return res; } }; --- a/unsupported/Eigen/SpecialFunctions +++ b/unsupported/Eigen/SpecialFunctions @@ -48,6 +48,9 @@ } #include "src/SpecialFunctions/SpecialFunctionsImpl.h" +#if defined(EIGEN_HIPCC) +#include "src/SpecialFunctions/HipVectorCompatibility.h" +#endif #include "src/SpecialFunctions/SpecialFunctionsPacketMath.h" #include "src/SpecialFunctions/SpecialFunctionsHalf.h" #include "src/SpecialFunctions/SpecialFunctionsFunctors.h" --- /dev/null +++ b/unsupported/Eigen/src/SpecialFunctions/HipVectorCompatibility.h @@ -0,0 +1,143 @@ +#ifndef HIP_VECTOR_COMPATIBILITY_H +#define HIP_VECTOR_COMPATIBILITY_H + +namespace hip_impl { + template struct Scalar_accessor; +} // end namespace hip_impl + +namespace Eigen { +namespace internal { + +#if EIGEN_HAS_C99_MATH +template +struct lgamma_impl> : lgamma_impl {}; +#endif + +template +struct digamma_impl_maybe_poly> + : digamma_impl_maybe_poly {}; + +template +struct digamma_impl> : digamma_impl {}; + +#if EIGEN_HAS_C99_MATH +template +struct erf_impl> : erf_impl {}; +#endif // EIGEN_HAS_C99_MATH + +#if EIGEN_HAS_C99_MATH +template +struct erfc_impl> : erfc_impl {}; +#endif // EIGEN_HAS_C99_MATH + +#if EIGEN_HAS_C99_MATH +template +struct ndtri_impl> : ndtri_impl {}; +#endif // EIGEN_HAS_C99_MATH + +template +struct igammac_cf_impl, mode> + : igammac_cf_impl {}; + +template +struct igamma_series_impl, mode> + : igamma_series_impl {}; + +#if EIGEN_HAS_C99_MATH +template +struct igammac_impl> : igammac_impl {}; +#endif // EIGEN_HAS_C99_MATH + +#if EIGEN_HAS_C99_MATH +template +struct igamma_generic_impl, mode> + : igamma_generic_impl {}; +#endif // EIGEN_HAS_C99_MATH + +template +struct igamma_impl> : igamma_impl {}; + +template +struct igamma_der_a_retval> + : igamma_der_a_retval {}; + +template +struct igamma_der_a_impl> + : igamma_der_a_impl {}; + +template +struct gamma_sample_der_alpha_retval> + : gamma_sample_der_alpha_retval {}; + +template +struct gamma_sample_der_alpha_impl> + : gamma_sample_der_alpha_impl {}; + +template +struct zeta_impl_series> + : zeta_impl_series {}; + +template +struct zeta_impl> : zeta_impl {}; + +#if EIGEN_HAS_C99_MATH +template +struct polygamma_impl> + : polygamma_impl {}; +#endif // EIGEN_HAS_C99_MATH + +#if EIGEN_HAS_C99_MATH +template +struct betainc_impl> : betainc_impl {}; + +template +struct incbeta_cfe> : incbeta_cfe {}; + +template +struct betainc_helper> + : betainc_helper {}; +#else +template +struct betainc_impl> : betainc_impl {}; +#endif // EIGEN_HAS_C99_MATH + +template +struct bessel_i0e_impl> : bessel_i0e_impl {}; + +template +struct bessel_i0_impl> : bessel_i0_impl {}; + +template +struct bessel_i1e_impl> : bessel_i1e_impl {}; + +template +struct bessel_i1_impl> : bessel_i1_impl {}; + +template +struct bessel_k0e_impl> : bessel_k0e_impl {}; + +template +struct bessel_k0_impl> : bessel_k0_impl {}; + +template +struct bessel_k1e_impl> : bessel_k1e_impl {}; + +template +struct bessel_k1_impl> : bessel_k1_impl {}; + +template +struct bessel_j0_impl> : bessel_j0_impl {}; + +template +struct bessel_y0_impl> : bessel_y0_impl {}; + +template +struct bessel_j1_impl> : bessel_j1_impl {}; + +template +struct bessel_y1_impl> : bessel_y1_impl {}; + +} // end namespace internal +} // end namespace Eigen + +#endif // HIP_VECTOR_COMPATIBILITY_H