tzhash/gf127/gf127x2_amd64.go
Evgenii Stratonikov 026731b260 gf127: use build tags for different implemenations
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-21 12:30:08 +03:00

27 lines
513 B
Go

//go:build amd64 && !generic
// +build amd64,!generic
package gf127
import "golang.org/x/sys/cpu"
// Mul10x2 sets (b1, b2) to (a1*x, a2*x)
func Mul10x2(a, b *GF127x2) {
if cpu.X86.HasAVX && cpu.X86.HasAVX2 {
mul10x2AVX2(a, b)
} else {
mul10x2Generic(a, b)
}
}
// Mul11x2 sets (b1, b2) to (a1*(x+1), a2*(x+1))
func Mul11x2(a, b *GF127x2) {
if cpu.X86.HasAVX && cpu.X86.HasAVX2 {
mul11x2AVX2(a, b)
} else {
mul11x2Generic(a, b)
}
}
func mul10x2AVX2(a, b *GF127x2)
func mul11x2AVX2(a, b *GF127x2)