Exemple #1
0
func dspmv(uplo string, N int, alpha float64,
	Ap []float64, X []float64, incX int, beta float64,
	Y []float64, incY int) {

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

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

}
Exemple #2
0
func dspmv(uplo string, N int, alpha float64,
	Ap []float64, X []float64, incX int, beta float64,
	Y []float64, incY int) {

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

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

}