コード例 #1
0
ファイル: cgo_double.go プロジェクト: hrautila/go.opt.old
func dsyr(uplo string, N int, alpha float64,
	X []float64, incX int, A []float64, lda int) {

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

	C.dsyr_(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(&A[0])),
		(*C.int)(unsafe.Pointer(&lda)))

}
コード例 #2
0
ファイル: cgo_double.go プロジェクト: sguzwf/algorithm
func dsyr(uplo string, N int, alpha float64,
	X []float64, incX int, A []float64, lda int) {

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

	// ?? TODO: protect against index out of bounds panics.
	C.dsyr_(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(&A[0])),
		(*C.int)(unsafe.Pointer(&lda)))

}