Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

_mm512_mul_epi32 not working?

c_s_
Beginner
1,322 Views
#include <immintrin.h>
#include <zmmintrin.h> // not needed but put here to show it is indeed included

...

__m512i a,b,c;
a = _mm512_mul_epi32(b,c);

 

produces this error:

undefined reference to '_mm512_mul_epi32'

 

0 Kudos
3 Replies
Patrick_S_
New Contributor I
1,322 Views

The Intrinsics function _mm512_mul_epi32 is not available on KNC, but you could use _mm512_mul_ps involving two cast operations. Cast operations have zero latency and thereby no influence on the performance.

Try sty like this:

[cpp]

__m512i x_, y_, z_;

x_ = _mm512_castps_si512( _mm512_mul_ps( _mm512_castsi512_ps(y_), _mm512_castsi512_ps(z_) ) );

[/cpp]

For some reasons I don't really understand the function _mm512_fmadd233_epi32 is listed in the Intrinsics guide as a = b*c. That is really strange - it must be a typo i guess...

Have a look in http://software.intel.com/sites/landingpage/IntrinsicsGuide/

0 Kudos
Sumedh_N_Intel
Employee
1,322 Views

Hi Patrick, 

This does seem to be a typo. I checked the Intel MIC instrinsic reference in the compiler documentation which seems to be correct.

0 Kudos
Sylvain_C_
Beginner
1,322 Views

Regarding the original question, the intrinsic for 32-bit integer multiplication is named _mm512_mullo_epi32.
(_mm512_mul_ps will do a floating-point multiplication, which may not be what the OP wanted).

0 Kudos
Reply