Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Eigen updated
Re: Eigen updated [message #54029 is a reply to message #54025] Fri, 22 May 2020 10:08 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
koldo wrote on Fri, 22 May 2020 07:25

Replacing #ifdef CPU_X86 with #if defined(CPU_X86) && defined(__SSE2__) just avoids the problem by avoiding #include <smmintrin.h>

The __SSE2__ define was used for <emmintrin.h> include, because of _mm_set1_epi32 usage. There is a possibility to use <immintrin.h> include for available intrinsics:
#ifdef __SSE2__
#include <emmintrin.h>
#endif

or <x86intrin.h>:
#include <immintrin.h>

But may need to check for related define where related intrinsic(s) used, I guess.

Some examples of how this was done for Eigen:
uppsrc/plugin/Eigen/Eigen/src/Core/util/ConfigureVectorizati on.h:236-238:
#ifdef __SSE4_1__
	#define EIGEN_VECTORIZE_SSE4_1
#endif

uppsrc/plugin/Eigen/Eigen/src/Core/util/ConfigureVectorizati on.h:350-352:
#ifdef EIGEN_VECTORIZE_SSE4_1
	#include <smmintrin.h>
#endif

for OpenGL Mathematics (GLM):
uppsrc/plugin/glm/simd/platform.h:242:
#define GLM_ARCH_SSE2	(GLM_ARCH_SSE2_BIT | GLM_ARCH_SSE)

uppsrc/plugin/glm/simd/platform.h:296-297:
#	elif defined(__SSE2__) || defined(__x86_64__) || defined(_M_X64) || defined(_M_IX86_FP)
# define GLM_ARCH (GLM_ARCH_SSE2)

uppsrc/plugin/glm/simd/platform.h:340-342:
#elif GLM_ARCH & GLM_ARCH_SSE2_BIT
#	include <emmintrin.h>
#endif//GLM_ARCH

Possible to fix Eigen build issue, if place usage of intrinsic(s) (e.g. in uppsrc/Core) inside of C/C++ (*.c/*.cpp) instead of header (*.h) files. Maybe there are other methods.

[Updated on: Fri, 22 May 2020 10:25]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Proposal] Blur algorithm (fast box blur with gaussian approximation)
Next Topic: Set mouse position
Goto Forum:
  


Current Time: Sat Apr 27 19:09:27 CEST 2024

Total time taken to generate the page: 2.04131 seconds