Initial implementation of igamma and igammac.

This commit is contained in:
Eugene Brevdo
2016-03-03 19:39:41 -08:00
parent ab3dc0b0fe
commit 7ea35bfa1c
10 changed files with 459 additions and 2 deletions

View File

@@ -116,6 +116,24 @@ double2 perfc<double2>(const double2& a)
return make_double2(erfc(a.x), erfc(a.y));
}
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
float4 pigamma<float4>(const float4& a, const float4& x)
{
using numext::pigamma;
return make_float4(
pigamma(a.x, x.x),
pigamma(a.y, x.y),
pigamma(a.z, x.z),
pigamma(a.w, x.w));
}
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
double2 pigammac<double2>(const double2& a, const double& x)
{
using numext::pigammac;
return make_double2(pigammac(a.x, x.x), pigammac(a.y, x.y));
}
#endif

View File

@@ -43,6 +43,8 @@ template<> struct packet_traits<float> : default_packet_traits
HasDiGamma = 1,
HasErf = 1,
HasErfc = 1,
HasIgamma = 1,
HasIGammac = 1,
HasBlend = 0,
};
@@ -67,6 +69,8 @@ template<> struct packet_traits<double> : default_packet_traits
HasDiGamma = 1,
HasErf = 1,
HasErfc = 1,
HasIGamma = 1,
HasIGammac = 1,
HasBlend = 0,
};