Ejemplo n.º 1
0
func Dsbmv(uplo string, n, k int, alpha float64, a []float64, lda int, x []float64, incx int, beta float64, y []float64, incy int) {
	cuplo := C.CString(uplo)
	defer C.free(unsafe.Pointer(cuplo))

	C.dsbmv_(
		cuplo,
		(*C.int)(unsafe.Pointer(&n)),
		(*C.int)(unsafe.Pointer(&k)),
		(*C.double)(unsafe.Pointer(&alpha)),
		array64(a),
		(*C.int)(unsafe.Pointer(&lda)),
		array64(x),
		(*C.int)(unsafe.Pointer(&incx)),
		(*C.double)(unsafe.Pointer(&beta)),
		array64(y),
		(*C.int)(unsafe.Pointer(&incy)),
	)
}
Ejemplo n.º 2
0
// For symmetric band matrix  and vector X solve
// Y = alpha * A * X + beta * Y
func dsbmv(uplo string, N int, K int, alpha float64,
	A []float64, lda int, X []float64, incX int, beta float64,
	Y []float64, incY int) {

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

	C.dsbmv_(cuplo,
		(*C.int)(unsafe.Pointer(&N)),
		(*C.int)(unsafe.Pointer(&K)),
		(*C.double)(unsafe.Pointer(&alpha)),
		(*C.double)(unsafe.Pointer(&A[0])),
		(*C.int)(unsafe.Pointer(&lda)),
		(*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)))

}
Ejemplo n.º 3
0
// For symmetric band matrix  and vector X solve
// Y = alpha * A * X + beta * Y
func dsbmv(uplo string, N int, K int, alpha float64,
	A []float64, lda int, 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.dsbmv_(cuplo,
		(*C.int)(unsafe.Pointer(&N)),
		(*C.int)(unsafe.Pointer(&K)),
		(*C.double)(unsafe.Pointer(&alpha)),
		(*C.double)(unsafe.Pointer(&A[0])),
		(*C.int)(unsafe.Pointer(&lda)),
		(*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)))

}