asm/c128: Adding bench sink variable.
MODIFY
internal/asm/c128/benchDot_bkprt_test.go
internal/asm/c128/benchDot_bkprt_test.go
@@ -12,7 +12,7 @@ func benchdotu(b *testing.B, n int64, fn func(x, y []complex128) complex128) {
x, y := x[:n], y[:n]
b.SetBytes(256 * n)
for i := 0; i < b.N; i++ {
- _ = fn(x, y)
+ benchSink = fn(x, y)
}
}
@@ -46,7 +46,7 @@ func benchdoti(b *testing.B, ln, inc int, fn func(x, y []complex128, n, incX, in
idx = (-ln + 1) * inc
}
for i := 0; i < b.N; i++ {
- _ = fn(x, y, uintptr(ln), uintptr(inc), uintptr(inc), uintptr(idx), uintptr(idx))
+ benchSink = fn(x, y, uintptr(ln), uintptr(inc), uintptr(inc), uintptr(idx), uintptr(idx))
}
}

MODIFY
internal/asm/c128/benchDot_test.go
internal/asm/c128/benchDot_test.go
@@ -24,7 +24,7 @@ func BenchmarkDotUnitary(t *testing.B) {
x, y := x[:v], y[:v]
b.SetBytes(256 * v)
for i := 0; i < b.N; i++ {
- _ = test.f(x, y)
+ benchSink = test.f(x, y)
}
})
}
@@ -48,7 +48,9 @@ func BenchmarkDotInc(t *testing.B) {
idx = (-ln + 1) * inc
}
for i := 0; i < b.N; i++ {
- _ = test.f(x, y, uintptr(ln), uintptr(inc), uintptr(inc), uintptr(idx), uintptr(idx))
+ benchSink = test.f(x, y, uintptr(ln),
+ uintptr(inc), uintptr(inc),
+ uintptr(idx), uintptr(idx))
}
})
}

MODIFY
internal/asm/c128/util_test.go
internal/asm/c128/util_test.go
@@ -16,6 +16,7 @@ const (
var (
inf = math.Inf(1)
+ benchSink complex128
)
func same(x, y complex128) bool {

asm/c128: Adding bench sink variable.