This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 521 - __cpuidex not defined for vs2012/arm
Summary: __cpuidex not defined for vs2012/arm
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.0
Hardware: ARM - general Windows
: Normal critical
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 15:53 UTC by Bram de Jong
Modified: 2019-12-04 11:55 UTC (History)
3 users (show)



Attachments

Description Bram de Jong 2012-10-16 15:53:08 UTC
Visual Studio 2012 supports ARM for windowsRT/surface. Trying to build Eigen out of the box (v3.0.5 - but I checked the latest has the same #defines) gives:

Core/util/Memory.h(756): error C3861: '__cpuidex': identifier not found

The ARM intrinsics defined by visual studio can be found here:
http://msdn.microsoft.com/en-us/library/hh875058.aspx

A quick hack around this right now is:

#elif defined(_MSC_VER)
#  if (_MSC_VER > 1500) && (_MSC_VER < 1700)
#    define EIGEN_CPUID(abcd,func,id) __cpuidex((int*)abcd,func,id)
#  endif
#endif

So that EIGEN_CPUID is not defined.
Comment 1 Bram de Jong 2012-10-16 15:57:25 UTC
Sorry, I accidentally wrote 2010 in the subject...
Comment 2 Gael Guennebaud 2012-10-24 10:05:45 UTC
we should only disable it for ARM
Comment 3 Gael Guennebaud 2012-10-24 10:08:57 UTC
Could you test this alternative:

#  elif defined(_MSC_VER)
#    if (_MSC_VER > 1500) && ( defined(__i386__) || defined(__x86_64__) )
#      define EIGEN_CPUID(abcd,func,id) __cpuidex((int*)abcd,func,id)
#    endif
#  endif
#endif

thanks
Comment 4 Gael Guennebaud 2012-10-24 10:23:36 UTC
nevermind, fixed:

https://bitbucket.org/eigen/eigen/changeset/f9f82be6e294/
changeset:   f9f82be6e294
user:        ggael
date:        2012-10-24 10:21:41
summary:     fix bug 521: __cpuidex is not available on all architectures supported by MSVC

https://bitbucket.org/eigen/eigen/changeset/574bfa0f89fd/
changeset:   574bfa0f89fd
branch:      3.1
user:        ggael
date:        2012-10-24 10:21:41
summary:     fix bug 521: __cpuidex is not available on all architectures supported by MSVC
(transplanted from f9f82be6e29488a17cfbdc1fbdc192a4410b0cc4)
Comment 5 Nobody 2019-12-04 11:55:51 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/521.

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