_mm_extract_epi16ADD TO COMPARE ADDED TO COMPARE
Intel 64-bit (64 bits)/ SSE4.2
View official documentation
Purpose:
Extract a 16-bit integer from a, selected with imm8, and store the result in the lower element of output.
Result:
int
Example:
#include <emmintrin.h>
#include <stdio.h>
int main() {
__m128i a = _mm_set_epi16(7, 6, 5, 4, 3, 2, 1, 0);
int r = _mm_extract_epi16(a, 3);
printf("%d\n", r);
return 0;
}
Prototypes
Assembly Instruction:
pextrw
Usage:
int result =
_mm_extract_epi16(
__m128i a, int b
)
Performance Metrics:
📊 Unlock Performance Insights
Get access to detailed performance metrics including latency, throughput, and CPU-specific benchmarks for this intrinsic.
SIMD Intrinsics Summary
| SIMD Engines: | 6 |
| C Intrinsics: | 10444 |
| NEON: | 4353 |
| AVX2: | 405 |
| AVX512: | 4717 |
| SSE4.2: | 598 |
| VSX: | 192 |
| IBM-Z: | 179 |