- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
While trying to emulate mm512_scalef_ps and mm512_scalef_round_ps, I noticed that there is no difference in the pseudocode provided in the Intel Intrinsics Guide.
Could it be clarified what the difference is between in the two intrinsics ?
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The mm512_scalef_ps does the rounding based on the rounding mode in the MXCSR.
The mm512_scalef_round_ps gets an additional rounding control parameter and use this rounding instead of the default (in MXCSR).
You can clearly see this in the description below (taken from the Intel intrinsic guide).
Scale the packed single-precision (32-bit) floating-point elements in a using values from b, and store the results in dst.
Rounding is done according to the rounding[3:0] parameter, which can be one of:
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The rounding you're talking about is the FLOOR() function in the pseudo-code, or is it something in addition to the FLOOR()?
Assuming the former, instead of FLOOR(tmp_src2[31:0]) shouldn't the pseudo-code be ROUND(tmp_src2[i+31:i], rounding[3:0]) for scalef_round and something like ROUND(tmp_src2[i+31:i], MXCSR[2:0] | _MM_FROUND_NO_EXC) for scalef?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I have since tried using _mm_setcsr to set the rounding mode before calling scalef to emulate scalef_round behaviour.
I was unable to emulate scalef_round using this.

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite