Skip to content

Commit 59b84c2

Browse files
authored
Merge pull request #85 from chriselrod/nothreaddefault
RFC: Do we want to multithread by default?
2 parents 75ca426 + 4cd07dc commit 59b84c2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/lu.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if VERSION >= v"1.7.0-DEV.1188"
1818
to_stdlib_pivot(::Val{false}) = LinearAlgebra.NoPivot()
1919
end
2020

21-
function lu(A::AbstractMatrix, pivot = Val(true), thread = Val(true); kwargs...)
21+
function lu(A::AbstractMatrix, pivot = Val(true), thread = Val(false); kwargs...)
2222
return lu!(copy(A), normalize_pivot(pivot), thread; kwargs...)
2323
end
2424

@@ -59,7 +59,7 @@ if CUSTOMIZABLE_PIVOT
5959
end
6060
end
6161

62-
function lu!(A, pivot = Val(true), thread = Val(true); check = true, kwargs...)
62+
function lu!(A, pivot = Val(true), thread = Val(false); check = true, kwargs...)
6363
m, n = size(A)
6464
minmn = min(m, n)
6565
npivot = normalize_pivot(pivot)
@@ -87,7 +87,7 @@ recurse(_) = false
8787
_ptrarray(ipiv) = PtrArray(ipiv)
8888
_ptrarray(ipiv::NotIPIV) = ipiv
8989
function lu!(A::AbstractMatrix{T}, ipiv::AbstractVector{<:Integer},
90-
pivot = Val(true), thread = Val(true);
90+
pivot = Val(true), thread = Val(false);
9191
check::Bool = true,
9292
# the performance is not sensitive wrt blocksize, and 8 is a good default
9393
blocksize::Integer = length(A) 40_000 ? 8 : 16,

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ testlu(A::Union{Transpose, Adjoint}, MF, BF, p) = testlu(parent(A), parent(MF),
4949
MF = mylu(A, p)
5050
BF = baselu(A, p)
5151
testlu(A, MF, BF, _p)
52-
testlu(A, mylu(A, p, Val(false)), BF, false)
52+
testlu(A, mylu(A, p, Val(true)), BF, false)
5353
A′ = permutedims(A)
5454
MF′ = mylu(A′', p)
5555
testlu(A′', MF′, BF, _p)
56-
testlu(A′', mylu(A′', p, Val(false)), BF, false)
56+
testlu(A′', mylu(A′', p, Val(true)), BF, false)
5757
i = rand(1:s) # test `MF.info`
5858
A[:, i] .= 0
5959
MF = mylu(A, p, check = false)
6060
BF = baselu(A, p, check = false)
6161
testlu(A, MF, BF, _p)
62-
testlu(A, mylu(A, p, Val(false), check = false), BF, false)
62+
testlu(A, mylu(A, p, Val(true), check = false), BF, false)
6363
end
6464
end
6565
end

0 commit comments

Comments
 (0)