Exemple #1
0
// Copy Y <= X
func dcopy(N int, X []float64, incX int, Y []float64, incY int) {
	C.dcopy_((*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)))
}
Exemple #2
0
//extern void dcopy_(int *n, double *x, int *incx, double *y, int *incy);
func Dcopy(n int, x []float64, incx int, y []float64, incy int) {
	C.dcopy_(
		(*C.int)(unsafe.Pointer(&n)),
		array64(x),
		(*C.int)(unsafe.Pointer(&incx)),
		array64(y),
		(*C.int)(unsafe.Pointer(&incy)),
	)
}