This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can't Find intrin.h

Tags: None
(comma "," separated)
Tom68
Registered Member
Posts
4
Karma
0

Can't Find intrin.h

Tue Jul 01, 2014 10:16 pm
I know there's a reported bug and solution for this, but I apparently have the fix and it doesn't solve the issue.

I'm using Eigen 3 with Visual Studio 2008 & 2013.

I built some code using 2013 and it ran fine. However, I need to to use 2008 as I'm ultimately building an app to run on Windows Embedded Compact 7 (WIN CE 7).

Can anyone give me some direction on what I might do? I really like the Eigen library and want to use it, but I can't seem to find a way past this.

Thanks ahead of time!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Can't Find intrin.h

Wed Jul 02, 2014 6:57 am
You might disable explicit vectorization by defining EIGEN_DONT_VECTORIZE.
Tom68
Registered Member
Posts
4
Karma
0

Re: Can't Find intrin.h

Wed Jul 02, 2014 12:58 pm
Thanks, I tried this and it didn't work. I inserted #define EIGEN_DONT_VECTORIZE just ahead of #include of the Eigen files.

Are there any other ways to keep Eigen from pulling in intrin.h? I'm only using a small portion of the library. I have allocate several matricies and one vector. I do a matrix transposition, several matrix multiplications, and one matrix inverse. The result is saved in the vector.

Is there a way to limit the library to just what I'm using?

Thanks.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Can't Find intrin.h

Wed Jul 02, 2014 1:15 pm
In Eigen/Core, what if you change
Code: Select all
// required for __cpuid, needs to be included after cmath
#if defined(_MSC_VER) && (defined(_M_IX86)||defined(_M_X64))
  #include <intrin.h>
#endif

to
Code: Select all
// required for __cpuid, needs to be included after cmath
#if defined(_MSC_VER) && (defined(_M_IX86)||defined(_M_X64))
  #include <cmnintrin.h>
#endif


If that does not work, then we can simply disable the use of cpuid under windows CE.
Tom68
Registered Member
Posts
4
Karma
0

Re: Can't Find intrin.h

Wed Jul 02, 2014 1:48 pm
The compiler complaint is about Core line 169: #include <intrin.h>.

If I comment out that line, the compiler has a single complaint about Memory.h line 281, '_aligned_realloc':identifier not found.

So I defined EIGEN_DONT_ALIGN and it now builds. Will this cause any issues?

Thanks.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Can't Find intrin.h

Wed Jul 02, 2014 2:08 pm
hm, make sure you are using the latest stable release (https://bitbucket.org/eigen/eigen/get/3.2.tar.gz). _aligned_realloc is explicitly disabled with WINCE.
Tom68
Registered Member
Posts
4
Karma
0

Re: Can't Find intrin.h

Wed Jul 02, 2014 2:57 pm
Ah, Thanks, you're a genius! I had the wrong version somehow.

I'm not sure what I had, but I deleted the entire directory and pasted in the files from your link and it builds without any changes or #defines.

Thanks, you've made my week.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]