Ejemplo n.º 1
0
func dspr2(uplo string, N int, alpha float64,
	X []float64, incX int, Y []float64, incY int, Ap []float64) {

	cuplo := C.CString(uplo)
	defer C.free(unsafe.Pointer(cuplo))

	C.dspr2_(cuplo,
		(*C.int)(unsafe.Pointer(&N)),
		(*C.double)(unsafe.Pointer(&alpha)),
		(*C.double)(unsafe.Pointer(&X[0])),
		(*C.int)(unsafe.Pointer(&incX)),
		(*C.double)(unsafe.Pointer(&Y[0])),
		(*C.int)(unsafe.Pointer(&incY)),
		(*C.double)(unsafe.Pointer(&Ap[0])))

}
Ejemplo n.º 2
0
func dspr2(uplo string, N int, alpha float64,
	X []float64, incX int, Y []float64, incY int, Ap []float64) {

	cuplo := C.CString(uplo)
	defer C.free(unsafe.Pointer(cuplo))

	// ?? TODO: protect against index out of bounds panics.
	C.dspr2_(cuplo,
		(*C.int)(unsafe.Pointer(&N)),
		(*C.double)(unsafe.Pointer(&alpha)),
		(*C.double)(unsafe.Pointer(&X[0])),
		(*C.int)(unsafe.Pointer(&incX)),
		(*C.double)(unsafe.Pointer(&Y[0])),
		(*C.int)(unsafe.Pointer(&incY)),
		(*C.double)(unsafe.Pointer(&Ap[0])))

}