Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RecursiveFactorization"
uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4"
authors = ["Yingbo Ma <mayingbo5@gmail.com>"]
version = "0.2.29"
version = "0.2.30"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
27 changes: 25 additions & 2 deletions src/RecursiveFactorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,31 @@ include("./butterflylu.jl")

import PrecompileTools

PrecompileTools.@compile_workload begin
lu!(rand(2, 2))
# Inference is whole-body, so n = 4 already reaches the recursive kernel and
# the TriangularSolve legs that only run above the blocksize threshold. Only
# type changes need their own case: eltype, the two `Val`s, and a matrix RHS.
PrecompileTools.@setup_workload begin
n = 4
for T in (Float64, Float32)
A = Matrix{T}(undef, n, n)
A .= rand.(T)
@view(A[LinearAlgebra.diagind(A)]) .+= T(n)
b = Vector{T}(undef, n)
b .= rand.(T)
B = Matrix{T}(undef, n, 2)
B .= rand.(T)
PrecompileTools.@compile_workload begin
lu(A)
lu!(copy(A))
lu!(copy(A), Val(true), Val(true))
lu!(copy(A), Val(false), Val(true))
F = lu!(copy(A), Val(false))
LinearAlgebra.ldiv!(F, copy(b))
LinearAlgebra.ldiv!(F, copy(B))
LinearAlgebra.ldiv!(lu(A), copy(b))
🦋solve!(🦋workspace(copy(A), copy(b)), Val(false))
end
end
end

end # module
Loading