SVML-Miscellaneous-XMM

SVML-Miscellaneous-XMM#

_mm_trunc_pd#

Tech:

SVML

Category:

Miscellaneous

Header:

immintrin.h

Searchable:

SVML-Miscellaneous-XMM

Register:

XMM 128 bit

Return Type:

__m128d

Param Types:

__m128d a

Param ETypes:

FP64 a

__m128d _mm_trunc_pd(__m128d a);

Intel Description

Truncate the packed double-precision (64-bit) floating-point elements in “a”, and store the results as packed double-precision floating-point elements in “dst”. This intrinsic may generate the “roundpd”/”vroundpd” instruction.

Intel Implementation Psudeo-Code

FOR j := 0 to 1
        i := j*64
        dst[i+63:i] := TRUNCATE(a[i+63:i])
ENDFOR
dst[MAX:128] := 0

_mm_trunc_ps#

Tech:

SVML

Category:

Miscellaneous

Header:

immintrin.h

Searchable:

SVML-Miscellaneous-XMM

Register:

XMM 128 bit

Return Type:

__m128

Param Types:

__m128 a

Param ETypes:

FP32 a

__m128 _mm_trunc_ps(__m128 a);

Intel Description

Truncate the packed single-precision (32-bit) floating-point elements in “a”, and store the results as packed single-precision floating-point elements in “dst”. This intrinsic may generate the “roundps”/”vroundps” instruction.

Intel Implementation Psudeo-Code

FOR j := 0 to 3
        i := j*32
        dst[i+31:i] := TRUNCATE(a[i+31:i])
ENDFOR
dst[MAX:128] := 0