MCPcopy Create free account
hub / github.com/egonelbre/exp / FuzzFieldReduceOnce8

Function FuzzFieldReduceOnce8

mldsa/simd_test.go:10–29  ·  view source on GitHub ↗
(f *testing.F)

Source from the content-addressed store, hash-verified

8)
9
10func FuzzFieldReduceOnce8(f *testing.F) {
11 var z uint32
12 f.Add(z, z, z, z, z, z, z, z)
13 f.Fuzz(func(t *testing.T, a0, a1, a2, a3, a4, a5, a6, a7 uint32) {
14 in := [8]uint32{a0, a1, a2, a3, a4, a5, a6, a7}
15 exp := [8]FieldElement{}
16
17 for i := range in {
18 exp[i] = FieldReduceOnce(in[i])
19 }
20
21 in8 := Uint32x8FromArray(in)
22 got8 := FieldReduceOnce8(in8)
23 got := FieldElement8AsArray(got8)
24
25 if exp != got {
26 t.Fatalf("wrong result in:%v exp:%v got:%v", in, exp, got)
27 }
28 })
29}
30
31func FuzzFieldReduceOnceRef(f *testing.F) {
32 var z uint32

Callers

nothing calls this directly

Calls 5

FieldReduceOnceFunction · 0.85
Uint32x8FromArrayFunction · 0.85
FieldReduceOnce8Function · 0.85
FieldElement8AsArrayFunction · 0.85
AddMethod · 0.65

Tested by

no test coverage detected