This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1450 - Error while compiling any Eigen code with nvcc
Summary: Error while compiling any Eigen code with nvcc
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.3 (current stable)
Hardware: x86 - 64-bit Windows
: Normal Compilation Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-18 07:45 UTC by Денис Сенькин
Modified: 2019-12-04 17:06 UTC (History)
3 users (show)



Attachments

Description Денис Сенькин 2017-07-18 07:45:47 UTC
Error:

d:\dev-tools\eigen\eigen\src/Core/MathFunctions.h(1090): error C2794: 'type' : is not a member of any direct or indirect base class of 'std::enable_if<false,T>'
1>          with
1>          [
1>              T=float
1>          ]
1>d:\dev-tools\eigen\eigen\src/Core/MathFunctions.h(1094): error C2794: 'type' : is not a member of any direct or indirect base class of 'std::enable_if<false,double>'
1>d:\dev-tools\eigen\eigen\src/Core/MathFunctions.h(1100): error C2794: 'type' : is not a member of any direct or indirect base class of 'std::enable_if<false,T>'
1>          with
1>          [
1>              T=float
1>          ]
1>d:\dev-tools\eigen\eigen\src/Core/MathFunctions.h(1106): error C2794: 'type' : is not a member of any direct or indirect base class of 'std::enable_if<false,double>'

Windows 10 x64
Visual Studio 2013
CUDA 8
Comment 1 Денис Сенькин 2017-07-18 08:02:36 UTC
Possible solution is to replace 

template<typename T>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
typename Eigen::internal::enable_if<!(NumTraits<T>::IsSigned || NumTraits<T>::isComplex), typename NumTraits<T>::Real>::type
abs(const T &x) {
  return x;
}


with


template<typename T, typename = typename Eigen::internal::enable_if<!(NumTraits<T>::IsSigned || NumTraits<T>::isComplex)>::type>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
typename NumTraits<T>::Real
abs(const T &x) {
  return x;
}
Comment 2 Nobody 2019-12-04 17:06:35 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1450.

Note You need to log in before you can comment on or make changes to this bug.