Skip to content

Commit

Permalink
mat: use lapack64.Potrs in Cholesky
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-ch committed Jul 10, 2018
1 parent 0057c8b commit 8694394
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mat/cholesky.go
Expand Up @@ -175,8 +175,7 @@ func (c *Cholesky) Solve(x *Dense, b Matrix) error {
if b != x {
x.Copy(b)
}
blas64.Trsm(blas.Left, blas.Trans, 1, c.chol.mat, x.mat)
blas64.Trsm(blas.Left, blas.NoTrans, 1, c.chol.mat, x.mat)
lapack64.Potrs(c.chol.mat, x.mat)
if c.cond > ConditionTolerance {
return Condition(c.cond)
}
Expand Down Expand Up @@ -228,8 +227,7 @@ func (c *Cholesky) SolveVec(x *VecDense, b Vector) error {
if x != b {
x.CopyVec(b)
}
blas64.Trsv(blas.Trans, c.chol.mat, x.mat)
blas64.Trsv(blas.NoTrans, c.chol.mat, x.mat)
lapack64.Potrs(c.chol.mat, x.asGeneral())
if c.cond > ConditionTolerance {
return Condition(c.cond)
}
Expand Down

0 comments on commit 8694394

Please sign in to comment.