mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clean up EIGEN_STATIC_ASSERT to only use standard c++11 static_assert.
This commit is contained in:
@@ -50,10 +50,10 @@ struct bessel_i0e_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_i0e {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -241,10 +241,10 @@ struct bessel_i1e_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type >
|
||||
struct generic_i1e {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -436,10 +436,10 @@ struct bessel_k0e_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_k0e {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -599,10 +599,10 @@ struct bessel_k0_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_k0 {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -771,10 +771,10 @@ struct bessel_k1e_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_k1e {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -927,10 +927,10 @@ struct bessel_k1_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_k1 {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -1093,10 +1093,10 @@ struct bessel_j0_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_j0 {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -1293,10 +1293,10 @@ struct bessel_y0_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_y0 {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -1491,10 +1491,10 @@ struct bessel_j1_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_j1 {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
@@ -1682,10 +1682,10 @@ struct bessel_y1_retval {
|
||||
|
||||
template <typename T, typename ScalarType = typename unpacket_traits<T>::type>
|
||||
struct generic_y1 {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T run(const T&) {
|
||||
return ScalarType(0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace internal {
|
||||
|
||||
template <typename Scalar>
|
||||
struct lgamma_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -128,10 +128,10 @@ struct digamma_retval {
|
||||
*/
|
||||
template <typename Scalar>
|
||||
struct digamma_impl_maybe_poly {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -392,10 +392,10 @@ struct erf_impl<double> {
|
||||
|
||||
template <typename Scalar>
|
||||
struct erfc_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -652,10 +652,10 @@ struct ndtri_retval {
|
||||
|
||||
template <typename Scalar>
|
||||
struct ndtri_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -954,10 +954,10 @@ struct igamma_series_impl {
|
||||
|
||||
template <typename Scalar>
|
||||
struct igammac_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static Scalar run(Scalar a, Scalar x) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static Scalar run(Scalar a, Scalar x) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -1053,10 +1053,10 @@ struct igammac_impl {
|
||||
|
||||
template <typename Scalar, IgammaComputationMode mode>
|
||||
struct igamma_generic_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar x) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar x) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -1257,10 +1257,10 @@ struct zeta_retval {
|
||||
|
||||
template <typename Scalar>
|
||||
struct zeta_impl_series {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Scalar) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -1468,10 +1468,10 @@ struct polygamma_retval {
|
||||
|
||||
template <typename Scalar>
|
||||
struct polygamma_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(Scalar n, Scalar x) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(Scalar n, Scalar x) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -1517,10 +1517,10 @@ struct betainc_retval {
|
||||
|
||||
template <typename Scalar>
|
||||
struct betainc_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar b, Scalar x) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar b, Scalar x) {
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -1529,8 +1529,10 @@ struct betainc_impl {
|
||||
|
||||
template <typename Scalar>
|
||||
struct betainc_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(Scalar, Scalar, Scalar) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(Scalar, Scalar, Scalar) {
|
||||
/* betaincf.c
|
||||
*
|
||||
* Incomplete beta integral
|
||||
@@ -1599,9 +1601,6 @@ struct betainc_impl {
|
||||
* incbet domain x<0, x>1 nan
|
||||
* incbet underflow nan
|
||||
*/
|
||||
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
@@ -1611,11 +1610,11 @@ struct betainc_impl {
|
||||
*/
|
||||
template <typename Scalar>
|
||||
struct incbeta_cfe {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar b, Scalar x, bool small_branch) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, float>::value ||
|
||||
internal::is_same<Scalar, double>::value),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, float>::value ||
|
||||
internal::is_same<Scalar, double>::value),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED)
|
||||
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar b, Scalar x, bool small_branch) {
|
||||
const Scalar big = cephes_helper<Scalar>::big();
|
||||
const Scalar machep = cephes_helper<Scalar>::machep();
|
||||
const Scalar biginv = cephes_helper<Scalar>::biginv();
|
||||
|
||||
Reference in New Issue
Block a user