Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
225 Views

How to realize the similary function of _mm512_reduce_max_epi32 (__m512i a) using AVX2 ?

The function description as below, but my computer don't support AVX512 Intrinsics,
So I want to know how to realize similary function using AVX2?

Thanks in advance ^_^


unsigned int mm512_reduce_max_epu32 (_m512i a)
Synopsis
unsigned int mm512_reduce_max_epu32 (_m512i a)
include <immintrin.h>
Instruction: Sequence
CPUID Flags: AVX512F for AVX-512, KNCNI for KNC
Description
Reduce the packed unsigned 32-bit integers in a by maximum. Returns the maximum of all elements in a.
Operation
dst[31:0] := 0
FOR j := 0 to 15
i := j*32
dst[31:0] := (dst[31:0] > a[i+31:i] ? dst[31:0] : a[i+31:i])
ENDFOR

0 Kudos
1 Reply
Highlighted
Novice
153 Views

I try to  use  <_mm_extract_epi32 > to extract &compare u32 data, and then choose the max value,but the parameter imm8 is const int type.

_mm_extract_epi32 (__m128i a, const int imm8)

0 Kudos