__lsx_vfrintrm_s

LSX intrinsic · group: Floating Point Misc

Synopsis

__m128 __lsx_vfrintrm_s (__m128 a)
#include <lsxintrin.h>
Instruction: vfrintrm.s vr, vr
CPU Flags: LSX

Description

Round single-precision floating point elements in a to integers, rounding towards negative infinity, and store as floating point numbers.

Operation

for (int i = 0; i < 4; i++) {
  dst.fp32[i] = (f32)(s32)a.fp32[i]; // rounding mode is not expressed in C
}

Latency and Throughput

CPU µarch Latency Throughput (IPC)
3C5000 LA464 4 2
3A6000 LA664 4 2
3C6000 LA664 4 2
2K1000LA LA264 4 1
2K3000 LA364E 4 1

All intrinsics in alphabetical order