Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Add square fast path
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Dec 15, 2014
1 parent 73d2610 commit 189d7a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mat64/dense_arithmetic.go
Expand Up @@ -474,6 +474,9 @@ func (m *Dense) Pow(a Matrix, n int) {
case 1:
m.Copy(a)
return
case 2:
m.Mul(a, a)
return
}

// Perform iterative exponentiation by squaring in work space.
Expand Down

0 comments on commit 189d7a2

Please sign in to comment.