SVML-Miscellaneous-YMM

SVML-Miscellaneous-YMM#

_mm256_trunc_pd#

Tech:

SVML

Category:

Miscellaneous

Header:

immintrin.h

Searchable:

SVML-Miscellaneous-YMM

Register:

YMM 256 bit

Return Type:

__m256d

Param Types:

__m256d a

Param ETypes:

FP64 a

__m256d _mm256_trunc_pd(__m256d 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 3
        i := j*64
        dst[i+63:i] := TRUNCATE(a[i+63:i])
ENDFOR
dst[MAX:256] := 0

_mm256_trunc_ps#

Tech:

SVML

Category:

Miscellaneous

Header:

immintrin.h

Searchable:

SVML-Miscellaneous-YMM

Register:

YMM 256 bit

Return Type:

__m256

Param Types:

__m256 a

Param ETypes:

FP32 a

__m256 _mm256_trunc_ps(__m256 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 7
        i := j*32
        dst[i+31:i] := TRUNCATE(a[i+31:i])
ENDFOR
dst[MAX:256] := 0