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
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TriangularSolve"
uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf"
authors = ["chriselrod <elrodc@gmail.com> and contributors"]
version = "0.2.5"
version = "0.2.6"

[deps]
CloseOpenIntervals = "fb6a15b2-703c-40df-9091-08a04967cfa9"
Expand All @@ -10,6 +10,7 @@ LayoutPointers = "10f19ff3-798f-405d-979b-55457f8fc047"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"

Expand All @@ -22,6 +23,7 @@ LayoutPointers = "0.1.2"
LinearAlgebra = "1"
LoopVectorization = "0.12.30"
Polyester = "0.4, 0.5, 0.6, 0.7"
PrecompileTools = "1"
Static = "0.2, 0.3, 0.4, 0.6, 0.7, 0.8, 1"
Test = "1"
VectorizationBase = "0.21"
Expand Down
55 changes: 37 additions & 18 deletions src/TriangularSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2391,26 +2391,45 @@ function _ldiv_U!(
nothing
end

#=
using PrecompileTools
@static if VERSION >= v"1.8.0-beta1"
@setup_workload begin
A = rand(1, 1)
B = rand(1, 1)
res = similar(A)
@compile_workload begin
rdiv!(res, A, UpperTriangular(B))
rdiv!(res, A, UnitUpperTriangular(B))
rdiv!(res, A, UpperTriangular(B), Val(false))
rdiv!(res, A, UnitUpperTriangular(B), Val(false))
using PrecompileTools: @setup_workload, @compile_workload

__init__()
ldiv!(res, LowerTriangular(B), A)
ldiv!(res, UnitLowerTriangular(B), A)
ldiv!(res, LowerTriangular(B), A, Val(false))
ldiv!(res, UnitLowerTriangular(B), A, Val(false))
@setup_workload begin
# The drivers branch on runtime sizes only, so N = 8 reaches every kernel:
# inference covers the untaken blocked and threaded branches. The four
# wrappers do not share specializations — each `ldiv!` transposes its args.
N = 8
for T in (Float64, Float32)
B = Matrix{T}(undef, N, N)
A = Matrix{T}(undef, N, N)
C = Matrix{T}(undef, N, N)
b = Vector{T}(undef, N)
c = Vector{T}(undef, N)
B .= rand.(T)
@view(B[diagind(B)]) .+= T(N)
A .= rand.(T)
b .= rand.(T)
@compile_workload begin
for W in (
UpperTriangular,
UnitUpperTriangular,
LowerTriangular,
UnitLowerTriangular
)
U = W(B)
rdiv!(C, A, U)
rdiv!(C, A, U, Val(false))
rdiv!(copyto!(C, A), U)
rdiv!(copyto!(C, A), U, Val(false))
ldiv!(C, U, A)
ldiv!(C, U, A, Val(false))
ldiv!(U, copyto!(C, A))
ldiv!(U, copyto!(C, A), Val(false))
ldiv!(c, U, b)
ldiv!(c, U, b, Val(false))
ldiv!(U, copyto!(c, b))
ldiv!(U, copyto!(c, b), Val(false))
end
end
end
end
=#
end
Loading