- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Consider the following snippet:
#include <immintrin.h> __m256i test() { return _mm512_cvtps_ph(_mm512_setzero_ps(), _MM_FROUND_CUR_DIRECTION); }
Compiling yields:
$ icpc test.c test.c(4): (col. 9) catastrophic error: Illegal value of immediate argument to intrinsic compilation aborted for test.c (code 1)
The Intel intrinsic docs explicitly mention _MM_FROUND_CUR_DIRECTION as a legal argument, so I'm pretty sure this is a bug. Also, in comparison, the following code with AVX intrinsics works without problems:
#include <immintrin.h> __m128i test() { return _mm256_cvtps_ph(_mm256_setzero_ps(), _MM_FROUND_CUR_DIRECTION); }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only rounding modes currently supported for this intrinsic are:
round to nearest int, round to positive or negative infinity, round to zero
I've opened DPD200413418 in our internal bugs database to get clarification about the rounding mode parameter
Thanks for the report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes this is to confirm your intrinsic usage is correct, we're working on a solution to the problem. Thanks again. --Melanie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A related question: is there any difference to the intrinsic
__m256i _mm512_cvt_roundps_ph (__m512 a, int rounding)
which has exactly the same signature? For reference:
__m256i _mm512_cvtps_ph (__m512 a, int rounding)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, it is identical intrinsics:
zmmintrin.h :
....
#define _mm512_cvtps_ph(v1, a) \
_mm512_cvt_roundps_ph((v1), (a))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PS there's an interactive intrinsics guide here: https://software.intel.com/sites/landingpage/IntrinsicsGuide/

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page