Skip to content

Commit 0370f66

Browse files
committed
Minimum and maximum index search functions
1 parent 62d9352 commit 0370f66

File tree

16 files changed

+471
-12
lines changed

16 files changed

+471
-12
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*******************************************************************************
44

55
=== 1.0.25 ===
6+
* Implemented AVX-512 optimized minimum and maximum search functions.
67
* Implemented AVX-512 optimized direct convolution function.
78
* Updated build scripts.
89

include/private/dsp/arch/x86/avx512/search.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@
2525
#include <lsp-plug.in/dsp/common/types.h>
2626

2727
#include <private/dsp/arch/x86/avx512/search/minmax.h>
28+
#include <private/dsp/arch/x86/avx512/search/iminmax.h>
2829

2930
#endif /* PRIVATE_DSP_ARCH_X86_AVX512_SEARCH_H_ */

include/private/dsp/arch/x86/avx512/search/iminmax.h

Lines changed: 384 additions & 0 deletions
Large diffs are not rendered by default.

src/main/x86/avx512.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,13 @@
268268
CEXPORT1(vl, abs_max);
269269
CEXPORT1(vl, abs_minmax);
270270

271+
CEXPORT1(vl, min_index);
272+
CEXPORT1(vl, max_index);
273+
CEXPORT1(vl, minmax_index);
274+
CEXPORT1(vl, abs_min_index);
275+
CEXPORT1(vl, abs_max_index);
276+
CEXPORT1(vl, abs_minmax_index);
277+
271278
CEXPORT1(vl, lr_to_ms);
272279
CEXPORT1(vl, lr_to_mid);
273280
CEXPORT1(vl, lr_to_side);

src/test/ptest/search/abs_max_index.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ namespace lsp
4444
{
4545
size_t abs_max_index(const float *src, size_t count);
4646
}
47+
48+
namespace avx512
49+
{
50+
size_t abs_max_index(const float *src, size_t count);
51+
}
4752
)
4853

4954
IF_ARCH_ARM(
@@ -101,6 +106,7 @@ PTEST_BEGIN("dsp.search", abs_max_index, 5, 1000)
101106
CALL(generic::abs_max_index);
102107
IF_ARCH_X86(CALL(sse2::abs_max_index));
103108
IF_ARCH_X86(CALL(avx2::abs_max_index));
109+
IF_ARCH_X86(CALL(avx512::abs_max_index));
104110
IF_ARCH_ARM(CALL(neon_d32::abs_max_index));
105111
IF_ARCH_AARCH64(CALL(asimd::abs_max_index));
106112
PTEST_SEPARATOR;

src/test/ptest/search/abs_min_index.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ namespace lsp
4444
{
4545
size_t abs_min_index(const float *src, size_t count);
4646
}
47+
48+
namespace avx512
49+
{
50+
size_t abs_min_index(const float *src, size_t count);
51+
}
4752
)
4853

4954
IF_ARCH_ARM(
@@ -101,6 +106,7 @@ PTEST_BEGIN("dsp.search", abs_min_index, 5, 1000)
101106
CALL(generic::abs_min_index);
102107
IF_ARCH_X86(CALL(sse2::abs_min_index));
103108
IF_ARCH_X86(CALL(avx2::abs_min_index));
109+
IF_ARCH_X86(CALL(avx512::abs_min_index));
104110
IF_ARCH_ARM(CALL(neon_d32::abs_min_index));
105111
IF_ARCH_AARCH64(CALL(asimd::abs_min_index));
106112
PTEST_SEPARATOR;

src/test/ptest/search/abs_minmax_index.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ namespace lsp
4444
{
4545
void abs_minmax_index(const float *src, size_t count, size_t *min, size_t *max);
4646
}
47+
48+
namespace avx512
49+
{
50+
void abs_minmax_index(const float *src, size_t count, size_t *min, size_t *max);
51+
}
4752
)
4853

4954
IF_ARCH_ARM(
@@ -101,6 +106,7 @@ PTEST_BEGIN("dsp.search", abs_minmax_index, 5, 1000)
101106
CALL(generic::abs_minmax_index);
102107
IF_ARCH_X86(CALL(sse2::abs_minmax_index));
103108
IF_ARCH_X86(CALL(avx2::abs_minmax_index));
109+
IF_ARCH_X86(CALL(avx512::abs_minmax_index));
104110
IF_ARCH_ARM(CALL(neon_d32::abs_minmax_index));
105111
IF_ARCH_AARCH64(CALL(asimd::abs_minmax_index));
106112
PTEST_SEPARATOR;

src/test/ptest/search/max_index.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ namespace lsp
4444
{
4545
size_t max_index(const float *src, size_t count);
4646
}
47+
48+
namespace avx512
49+
{
50+
size_t max_index(const float *src, size_t count);
51+
}
4752
)
4853

4954
IF_ARCH_ARM(
@@ -101,6 +106,7 @@ PTEST_BEGIN("dsp.search", max_index, 5, 1000)
101106
CALL(generic::max_index);
102107
IF_ARCH_X86(CALL(sse2::max_index));
103108
IF_ARCH_X86(CALL(avx2::max_index));
109+
IF_ARCH_X86(CALL(avx512::max_index));
104110
IF_ARCH_ARM(CALL(neon_d32::max_index));
105111
IF_ARCH_AARCH64(CALL(asimd::max_index));
106112
PTEST_SEPARATOR;

src/test/ptest/search/min_index.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ namespace lsp
4444
{
4545
size_t min_index(const float *src, size_t count);
4646
}
47+
48+
namespace avx512
49+
{
50+
size_t min_index(const float *src, size_t count);
51+
}
4752
)
4853

4954
IF_ARCH_ARM(
@@ -101,6 +106,7 @@ PTEST_BEGIN("dsp.search", min_index, 5, 1000)
101106
CALL(generic::min_index);
102107
IF_ARCH_X86(CALL(sse2::min_index));
103108
IF_ARCH_X86(CALL(avx2::min_index));
109+
IF_ARCH_X86(CALL(avx512::min_index));
104110
IF_ARCH_ARM(CALL(neon_d32::min_index));
105111
IF_ARCH_AARCH64(CALL(asimd::min_index));
106112
PTEST_SEPARATOR;

src/test/ptest/search/minmax_index.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ namespace lsp
4444
{
4545
void minmax_index(const float *src, size_t count, size_t *min, size_t *max);
4646
}
47+
48+
namespace avx512
49+
{
50+
void minmax_index(const float *src, size_t count, size_t *min, size_t *max);
51+
}
4752
)
4853

4954
IF_ARCH_ARM(
@@ -102,6 +107,7 @@ PTEST_BEGIN("dsp.search", minmax_index, 5, 1000)
102107
CALL(generic::minmax_index);
103108
IF_ARCH_X86(CALL(sse2::minmax_index));
104109
IF_ARCH_X86(CALL(avx2::minmax_index));
110+
IF_ARCH_X86(CALL(avx512::minmax_index));
105111
IF_ARCH_ARM(CALL(neon_d32::minmax_index));
106112
IF_ARCH_AARCH64(CALL(asimd::minmax_index));
107113
PTEST_SEPARATOR;

0 commit comments

Comments
 (0)