__lsx_vsat_d
LSX intrinsic · group: Misc
Synopsis
__m128i __lsx_vsat_d (__m128i a, imm0_63 imm)
#include <lsxintrin.h>
Instruction: vsat.d vr, vr, imm
CPU Flags: LSX
Description
Saturate each signed 64-bit element in a to the number of significant bits specified by imm.
Operation
for (int i = 0; i < 2; i++) {
dst.dword[i] = clamp<s64>(a.dword[i], -(1 << imm), (1 << imm) - 1);
}
Tested on real machine.
Latency and Throughput
| CPU | µarch | Latency | Throughput (IPC) |
|---|---|---|---|
| 3C5000 | LA464 | 2 | 2 |
| 3A6000 | LA664 | 2 | 2 |
| 3C6000 | LA664 | 2 | 2 |
| 2K1000LA | LA264 | 2 | 1 |
| 2K3000 | LA364E | 2 | 1 |