Fix static/inline keywords order.

This commit is contained in:
Gael Guennebaud 2016-04-11 15:06:20 +02:00
parent fc6a0ebb1c
commit 675e0a2224
2 changed files with 28 additions and 28 deletions

View File

@ -788,8 +788,8 @@ template<typename Dst, typename Src> void check_for_aliasing(const Dst &dst, con
template< typename DstXprType, typename SrcXprType, typename Functor, typename Scalar> template< typename DstXprType, typename SrcXprType, typename Functor, typename Scalar>
struct Assignment<DstXprType, SrcXprType, Functor, Dense2Dense, Scalar> struct Assignment<DstXprType, SrcXprType, Functor, Dense2Dense, Scalar>
{ {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static void run(DstXprType &dst, const SrcXprType &src, const Functor &func) static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
{ {
eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());
@ -806,8 +806,8 @@ struct Assignment<DstXprType, SrcXprType, Functor, Dense2Dense, Scalar>
template< typename DstXprType, typename SrcXprType, typename Functor, typename Scalar> template< typename DstXprType, typename SrcXprType, typename Functor, typename Scalar>
struct Assignment<DstXprType, SrcXprType, Functor, EigenBase2EigenBase, Scalar> struct Assignment<DstXprType, SrcXprType, Functor, EigenBase2EigenBase, Scalar>
{ {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar> &/*func*/) static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar> &/*func*/)
{ {
eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());
src.evalTo(dst); src.evalTo(dst);

View File

@ -79,8 +79,8 @@ namespace cephes {
*/ */
template <typename Scalar, int N> template <typename Scalar, int N>
struct polevl { struct polevl {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static Scalar run(const Scalar x, const Scalar coef[]) { static EIGEN_STRONG_INLINE Scalar run(const Scalar x, const Scalar coef[]) {
EIGEN_STATIC_ASSERT((N > 0), YOU_MADE_A_PROGRAMMING_MISTAKE); EIGEN_STATIC_ASSERT((N > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
return polevl<Scalar, N - 1>::run(x, coef) * x + coef[N]; return polevl<Scalar, N - 1>::run(x, coef) * x + coef[N];
@ -89,8 +89,8 @@ struct polevl {
template <typename Scalar> template <typename Scalar>
struct polevl<Scalar, 0> { struct polevl<Scalar, 0> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static Scalar run(const Scalar, const Scalar coef[]) { static EIGEN_STRONG_INLINE Scalar run(const Scalar, const Scalar coef[]) {
return coef[0]; return coef[0];
} }
}; };
@ -144,7 +144,7 @@ struct digamma_retval {
template <typename Scalar> template <typename Scalar>
struct digamma_impl { struct digamma_impl {
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC
static Scalar run(Scalar x) { static EIGEN_STRONG_INLINE Scalar run(Scalar x) {
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false), EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
THIS_TYPE_IS_NOT_SUPPORTED); THIS_TYPE_IS_NOT_SUPPORTED);
return Scalar(0); return Scalar(0);
@ -428,20 +428,20 @@ template <typename Scalar> struct igamma_impl; // predeclare igamma_impl
template <typename Scalar> template <typename Scalar>
struct igamma_helper { struct igamma_helper {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static Scalar machep() { assert(false && "machep not supported for this type"); return 0.0; } static EIGEN_STRONG_INLINE Scalar machep() { assert(false && "machep not supported for this type"); return 0.0; }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static Scalar big() { assert(false && "big not supported for this type"); return 0.0; } static EIGEN_STRONG_INLINE Scalar big() { assert(false && "big not supported for this type"); return 0.0; }
}; };
template <> template <>
struct igamma_helper<float> { struct igamma_helper<float> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static float machep() { static EIGEN_STRONG_INLINE float machep() {
return NumTraits<float>::epsilon() / 2; // 1.0 - machep == 1.0 return NumTraits<float>::epsilon() / 2; // 1.0 - machep == 1.0
} }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static float big() { static EIGEN_STRONG_INLINE float big() {
// use epsneg (1.0 - epsneg == 1.0) // use epsneg (1.0 - epsneg == 1.0)
return 1.0 / (NumTraits<float>::epsilon() / 2); return 1.0 / (NumTraits<float>::epsilon() / 2);
} }
@ -449,12 +449,12 @@ struct igamma_helper<float> {
template <> template <>
struct igamma_helper<double> { struct igamma_helper<double> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static double machep() { static EIGEN_STRONG_INLINE double machep() {
return NumTraits<double>::epsilon() / 2; // 1.0 - machep == 1.0 return NumTraits<double>::epsilon() / 2; // 1.0 - machep == 1.0
} }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static double big() { static EIGEN_STRONG_INLINE double big() {
return 1.0 / NumTraits<double>::epsilon(); return 1.0 / NumTraits<double>::epsilon();
} }
}; };
@ -605,7 +605,7 @@ struct igamma_retval {
template <typename Scalar> template <typename Scalar>
struct igamma_impl { struct igamma_impl {
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC
static Scalar run(Scalar a, Scalar x) { static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar x) {
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false), EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
THIS_TYPE_IS_NOT_SUPPORTED); THIS_TYPE_IS_NOT_SUPPORTED);
return Scalar(0); return Scalar(0);
@ -736,7 +736,7 @@ struct zeta_retval {
template <typename Scalar> template <typename Scalar>
struct zeta_impl { struct zeta_impl {
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC
static Scalar run(Scalar x, Scalar q) { static EIGEN_STRONG_INLINE Scalar run(Scalar x, Scalar q) {
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false), EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
THIS_TYPE_IS_NOT_SUPPORTED); THIS_TYPE_IS_NOT_SUPPORTED);
return Scalar(0); return Scalar(0);
@ -757,8 +757,8 @@ struct zeta_impl_series {
template <> template <>
struct zeta_impl_series<float> { struct zeta_impl_series<float> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static bool run(float& a, float& b, float& s, const float x, const float machep) { static EIGEN_STRONG_INLINE bool run(float& a, float& b, float& s, const float x, const float machep) {
int i = 0; int i = 0;
while(i < 9) while(i < 9)
{ {
@ -777,8 +777,8 @@ struct zeta_impl_series<float> {
template <> template <>
struct zeta_impl_series<double> { struct zeta_impl_series<double> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
static bool run(double& a, double& b, double& s, const double x, const double machep) { static EIGEN_STRONG_INLINE bool run(double& a, double& b, double& s, const double x, const double machep) {
int i = 0; int i = 0;
while( (i < 9) || (a <= 9.0) ) while( (i < 9) || (a <= 9.0) )
{ {
@ -955,7 +955,7 @@ struct polygamma_retval {
template <typename Scalar> template <typename Scalar>
struct polygamma_impl { struct polygamma_impl {
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC
static Scalar run(Scalar n, Scalar x) { static EIGEN_STRONG_INLINE Scalar run(Scalar n, Scalar x) {
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false), EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
THIS_TYPE_IS_NOT_SUPPORTED); THIS_TYPE_IS_NOT_SUPPORTED);
return Scalar(0); return Scalar(0);