Ejemplo n.º 1
0
func Ddot(N int, X []float64, incX int, Y []float64, incY int) float64 {
	val := C.ddot_((*C.int)(unsafe.Pointer(&N)),
		array64(X),
		(*C.int)(unsafe.Pointer(&incX)),
		array64(Y),
		(*C.int)(unsafe.Pointer(&incY)))
	return float64(val)
}
Ejemplo n.º 2
0
// Calculates X.T*Y
func ddot(N int, X []float64, incX int, Y []float64, incY int) float64 {
	var val C.double
	val = C.ddot_((*C.int)(unsafe.Pointer(&N)),
		(*C.double)(unsafe.Pointer(&X[0])),
		(*C.int)(unsafe.Pointer(&incX)),
		(*C.double)(unsafe.Pointer(&Y[0])),
		(*C.int)(unsafe.Pointer(&incY)))
	return float64(val)
}