This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1140 - Intel 15.0.1 warning incompatible redefinition of macro "_mm256_setr_m128"
Summary: Intel 15.0.1 warning incompatible redefinition of macro "_mm256_setr_m128"
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - vectorization (show other bugs)
Version: unspecified
Hardware: x86 - AVX Linux
: Normal Compilation Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-17 19:43 UTC by jeff.daily
Modified: 2019-12-04 15:18 UTC (History)
4 users (show)



Attachments

Description jeff.daily 2015-12-17 19:43:30 UTC
Intel 15.0.1 (composer_xe_2015.1.133) immintrin.h defines _mm256_setr_m128 as the following:

#define _mm256_setr_m128(lo, hi)    _mm256_set_m128((hi), (lo))

This is not compatible with Eigen/src/Core/arch/AVX/MathFunctions.h:

// For some reason, this function didn't make it into the avxintirn.h
// used by the compiler, so we'll just wrap it.
#define _mm256_setr_m128(lo, hi) \
  _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1)

Perhaps the #define in MathFunctions.h should be protected with an #ifndef ?  Would that break anything?

So far this is just a warning, but I am curious why the cast is needed?
Comment 1 Gael Guennebaud 2015-12-18 13:20:10 UTC
Fixed: https://bitbucket.org/eigen/eigen/commits/69441f92b003/
Comment 2 jeff.daily 2015-12-18 18:37:36 UTC
Apologies for drudging this up again -- thanks for fixing so quickly -- but was the change to the following line correct?

-  Packet8i sign_flip_mask = _mm256_setr_m128(lo, hi);

+  Packet8i sign_flip_mask = _mm256_setr_m128(hi, lo);

I see that the order of lo/hi was swapped, but the set-reverse "setr" function is still called rather than the "set" function.  I point this out because the other diffs in this commit have swapped the lo/hi order *AND* changed it from setr to just set.
Comment 4 Nobody 2019-12-04 15:18:01 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/1140.

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