Example #1
0
func DTrmmLowerTransA(B, A []float64, alpha float64, unit bool, ldB, ldA, N, S, L int) {
	var Bm C.mdata_t
	var Am C.mdata_t
	Bm.md = (*C.double)(unsafe.Pointer(&B[0]))
	Bm.step = C.int(ldB)
	Am.md = (*C.double)(unsafe.Pointer(&A[0]))
	Am.step = C.int(ldA)

	var flags Flags = LOWER | TRANSA
	if unit {
		flags |= UNIT
	}
	C.dmmat_trid_unb(
		(*C.mdata_t)(unsafe.Pointer(&Bm)),
		(*C.mdata_t)(unsafe.Pointer(&Am)),
		C.double(alpha), C.int(flags), C.int(N), C.int(S), C.int(L))

}
Example #2
0
// blas TRMM; unblocked
// S is the start column (LEFT), row (RIGHT); E is the end column (LEFT), row (RIGHT)
func DTrmmUnblk(B, A []float64, alpha float64, flags Flags, ldB, ldA, N, S, E, NB int) {
	var Bm C.mdata_t
	var Am C.mdata_t

	if B == nil || A == nil {
		return
	}
	if N == 0 || E-S <= 0 {
		return
	}
	Bm.md = (*C.double)(unsafe.Pointer(&B[0]))
	Bm.step = C.int(ldB)
	Am.md = (*C.double)(unsafe.Pointer(&A[0]))
	Am.step = C.int(ldA)

	C.dmmat_trid_unb(
		(*C.mdata_t)(unsafe.Pointer(&Bm)),
		(*C.mdata_t)(unsafe.Pointer(&Am)),
		C.double(alpha), C.int(flags), C.int(N), C.int(S), C.int(E),
		/*C.int(R), C.int(E),*/)

}