Beispiel #1
0
// void dpotri_(char *uplo, int *n, double *A, int *lda, int *info);
func dpotri(uplo string, N int, A []float64, lda int) int {
	var info int = 0
	cuplo := C.CString(uplo)
	defer C.free(unsafe.Pointer(cuplo))
	C.dpotri_(cuplo,
		(*C.int)(unsafe.Pointer(&N)),
		(*C.double)(unsafe.Pointer(&A[0])),
		(*C.int)(unsafe.Pointer(&lda)),
		(*C.int)(unsafe.Pointer(&info)))
	return info

}
Beispiel #2
0
// DPOTRI: (Double-precision) POsitive-definite (TRiangular factor) Inverse
//
// http://www.netlib.org/lapack/double/dpotri.f
func dpotri(uplo Triangle, n int, a []float64, lda int) error {
	var (
		uplo_ = uploChar(uplo)
		n_    = C.integer(n)
		a_    = ptrFloat64(a)
		lda_  = C.integer(lda)
	)
	var info_ C.integer

	C.dpotri_(&uplo_, &n_, a_, &lda_, &info_)
	return dpotriError(int(info_))
}