Skip to content

Commit

Permalink
Precompile instructions for basic algebra operations (#292)
Browse files Browse the repository at this point in the history
* Precompile basis algebra operations

* Add precompile assertion checks

* Precompile Matrix*Vector
  • Loading branch information
jishnub authored Jan 27, 2023
1 parent dfbf44f commit 9a573b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/BandedMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,14 @@ include("interfaceimpl.jl")

# _precompile_()

# precompile instructions
let B = BandedMatrix(0=>zeros(0)), v = zeros(size(B,2))
BT = typeof(B)
vT = typeof(v)
@assert precompile(+, (BT, BT))
@assert precompile(-, (BT,))
@assert precompile(-, (BT, BT))
@assert precompile(*, (BT, vT))
end

end #module

0 comments on commit 9a573b1

Please sign in to comment.