Software Tuning, Performance Optimization & Platform Monitoring
Discussion around monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform monitoring
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
1572 Discussions

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

stephenXX
Novice
347 Views

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
stephenXX
Novice
275 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)

Reply