2023-06-21 14:35:58 +08:00
|
|
|
//go:build (amd64 && !purego) || (arm64 && !purego)
|
|
|
|
|
|
|
|
package bn256
|
|
|
|
|
|
|
|
import "golang.org/x/sys/cpu"
|
|
|
|
|
|
|
|
var supportAVX2 = cpu.X86.HasAVX2
|
|
|
|
|
|
|
|
// If cond is 0, sets res = b, otherwise sets res = a.
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func gfP12MovCond(res, a, b *gfP12, cond int)
|
2023-06-21 15:45:06 +08:00
|
|
|
|
|
|
|
// If cond is 0, sets res = b, otherwise sets res = a.
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func curvePointMovCond(res, a, b *curvePoint, cond int)
|
|
|
|
|
|
|
|
// If cond is 0, sets res = b, otherwise sets res = a.
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func twistPointMovCond(res, a, b *twistPoint, cond int)
|
2023-06-30 17:51:35 +08:00
|
|
|
|
|
|
|
//go:noescape
|
|
|
|
func gfpCopy(res, in *gfP)
|
|
|
|
|
|
|
|
//go:noescape
|
|
|
|
func gfp2Copy(res, in *gfP2)
|
|
|
|
|
|
|
|
//go:noescape
|
|
|
|
func gfp4Copy(res, in *gfP4)
|
|
|
|
|
2023-07-06 17:36:34 +08:00
|
|
|
//go:noescape
|
|
|
|
func gfp6Copy(res, in *gfP6)
|
|
|
|
|
2023-06-30 17:51:35 +08:00
|
|
|
//go:noescape
|
|
|
|
func gfp12Copy(res, in *gfP12)
|