//+build !noasm
//+build !appengine

package dotproduct

//go:noescape
func _dp_int32(a *int32, b *int32, gN *int32, res *int32)

//go:noescape
func _dpavx_int32(a *int32, b *int32, gN *int32, res *int32)

//go:noescape
func Sum(x []uint64) uint64

func DotProductAsm(a []int32, b []int32, N int32) int32 {
	var val *int32
	var res1 int32
	val = &res1
	_dp_int32((&a[0]), (&b[0]), (&N), (val))
	//fmt.Printf("val %+v %+v\n", N, res1)
	return *val
}

func DotProductAsmAvx(a []int32, b []int32, N int32) int32 {
	var val *int32
	var res1 int32
	val = &res1
	_dpavx_int32((&a[0]), (&b[0]), (&N), (val))
	//fmt.Printf("val %+v %+v\n", N, res1)
	return *val
}
