Adds missing EIGEN_STRONG_INLINE to support MSVC properly inlining small vector calculations

When working with MSVC often small vector operations are not properly inlined. This behaviour is observed even on the most recent compiler versions.
This commit is contained in:
Basil Fierz
2017-10-26 22:44:28 +02:00
parent 746a6b7b81
commit 624df50945
4 changed files with 26 additions and 23 deletions

View File

@@ -407,7 +407,7 @@ protected:
*/
template<typename Derived>
template<typename Func>
EIGEN_DEVICE_FUNC typename internal::traits<Derived>::Scalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar
DenseBase<Derived>::redux(const Func& func) const
{
eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix");