コード例 #1
0
ファイル: removed.go プロジェクト: sguzwf/algorithm
func DSolveLower(X, A []float64, unit bool, incX, ldA, N, NB int) {
	var Xv C.mvec_t
	var Am C.mdata_t
	Xv.md = (*C.double)(unsafe.Pointer(&X[0]))
	Xv.inc = C.int(incX)
	Am.md = (*C.double)(unsafe.Pointer(&A[0]))
	Am.step = C.int(ldA)

	var flags Flags = LOWER
	if unit {
		flags |= UNIT
	}
	C.dmvec_solve_unb(
		(*C.mvec_t)(unsafe.Pointer(&Xv)),
		(*C.mdata_t)(unsafe.Pointer(&Am)),
		C.int(flags), C.int(N))

}
コード例 #2
0
ファイル: cmops.go プロジェクト: sguzwf/algorithm
// blas TSMV; unblocked version
func DSolveUnblkMV(X, A []float64, flags Flags, incX, ldA, N int) {
	var Xv C.mvec_t
	var Am C.mdata_t

	if A == nil || X == nil {
		return
	}
	Xv.md = (*C.double)(unsafe.Pointer(&X[0]))
	Xv.inc = C.int(incX)
	Am.md = (*C.double)(unsafe.Pointer(&A[0]))
	Am.step = C.int(ldA)

	C.dmvec_solve_unb(
		(*C.mvec_t)(unsafe.Pointer(&Xv)),
		(*C.mdata_t)(unsafe.Pointer(&Am)),
		C.int(flags), C.int(N))

}