Add AArch64 NEON parity generation and recovery functions

This commit is contained in:
Andrea Mazzoleni 2026-06-04 22:05:59 +02:00
parent 7358bc0879
commit 677aa0cc90
12 changed files with 1755 additions and 6 deletions

View file

@ -274,6 +274,9 @@ void speed(int period, int nd, int size)
printf("%8s", "int8");
printf("%8s", "int32");
printf("%8s", "int64");
#ifdef CONFIG_NEON
printf("%8s", "neon");
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
printf("%8s", "sse2");
@ -325,6 +328,15 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
raid_gen1_neon(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
SPEED_START {
@ -388,6 +400,15 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
raid_gen2_neon(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
SPEED_START {
@ -473,6 +494,15 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
raid_genz_neon(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
SPEED_START {
@ -526,6 +556,15 @@ void speed(int period, int nd, int size)
printf("%8s", "");
printf("%8s", "");
#ifdef CONFIG_NEON
SPEED_START {
raid_gen3_neon(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
printf("%8s", "");
@ -606,6 +645,15 @@ void speed(int period, int nd, int size)
printf("%8s", "");
printf("%8s", "");
#ifdef CONFIG_NEON
SPEED_START {
raid_gen4_neon(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
printf("%8s", "");
@ -686,6 +734,15 @@ void speed(int period, int nd, int size)
printf("%8s", "");
printf("%8s", "");
#ifdef CONFIG_NEON
SPEED_START {
raid_gen5_neon(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
printf("%8s", "");
@ -765,6 +822,15 @@ void speed(int period, int nd, int size)
printf("%8s", "");
printf("%8s", "");
#ifdef CONFIG_NEON
SPEED_START {
raid_gen6_neon(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_sse2()) {
printf("%8s", "");
@ -835,6 +901,9 @@ void speed(int period, int nd, int size)
printf("%8s", "");
printf("%8s", "best");
printf("%8s", "int8");
#ifdef CONFIG_NEON
printf("%8s", "neon");
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_ssse3())
printf("%8s", "ssse3");
@ -865,6 +934,18 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
/* ensure to use same hardware in the delta step */
raid_gen_force(1, raid_gen1_neon);
/* +1 to avoid GEN1 optimized case */
raid_rec1_neon(1, id, ip + 1, nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_ssse3()) {
SPEED_START {
@ -940,6 +1021,18 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
/* ensure to use same hardware in the delta step */
raid_gen_force(2, raid_gen2_neon);
/* +1 to avoid GEN2 optimized case */
raid_rec2_neon(2, id, ip + 1, nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_ssse3()) {
SPEED_START {
@ -1018,6 +1111,17 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
/* ensure to use same hardware in the delta step */
raid_gen_force(3, raid_gen3_neon);
raid_recX_neon(3, id, ip, nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_ssse3()) {
SPEED_START {
@ -1096,6 +1200,17 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
/* ensure to use same hardware in the delta step */
raid_gen_force(4, raid_gen4_neon);
raid_recX_neon(4, id, ip, nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_ssse3()) {
SPEED_START {
@ -1175,6 +1290,17 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
/* ensure to use same hardware in the delta step */
raid_gen_force(5, raid_gen5_neon);
raid_recX_neon(5, id, ip, nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_ssse3()) {
SPEED_START {
@ -1253,6 +1379,17 @@ void speed(int period, int nd, int size)
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_NEON
SPEED_START {
/* ensure to use same hardware in the delta step */
raid_gen_force(6, raid_gen6_neon);
raid_recX_neon(6, id, ip, nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#endif
#ifdef CONFIG_X86
if (raid_cpu_has_ssse3()) {
SPEED_START {