mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Optimize AVX512 gen1 parity with the vpternlogq instruction
This commit is contained in:
parent
d773f21c1e
commit
d67cdd8b9d
1 changed files with 13 additions and 2 deletions
15
raid/x86.c
15
raid/x86.c
|
|
@ -208,9 +208,20 @@ void raid_gen1_avx512bw(int nd, size_t size, void **vv)
|
|||
|
||||
for (i = 0; i < size; i += 64) {
|
||||
asm volatile ("vmovdqa64 %0,%%zmm0" : : "m" (v[l][i]));
|
||||
for (d = l - 1; d >= 0; --d) {
|
||||
asm volatile ("vpxorq %0,%%zmm0,%%zmm0" : : "m" (v[d][i]));
|
||||
|
||||
for (d = l - 1; d >= 1; d -= 2) {
|
||||
asm volatile (
|
||||
"vmovdqa64 %0,%%zmm1\n\t"
|
||||
"vpternlogq $0x96,%1,%%zmm1,%%zmm0"
|
||||
:
|
||||
: "m" (v[d][i]), "m" (v[d-1][i])
|
||||
);
|
||||
}
|
||||
|
||||
if (d == 0) {
|
||||
asm volatile ("vpxorq %0, %%zmm0,%%zmm0" : : "m" (v[0][i]));
|
||||
}
|
||||
|
||||
asm volatile ("vmovntdq %%zmm0,%0" : "=m" (p[i]));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue