Skip to content

Commit 8119c64

Browse files
[ci-skip] Revert "Apply JuliaFormatter to fix code formatting"
This reverts commit 85c0e34. Reverting JuliaFormatter changes due to formatting issues being addressed in JuliaFormatter.jl PR#933.
1 parent 51ff7a1 commit 8119c64

File tree

10 files changed

+16
-17
lines changed

10 files changed

+16
-17
lines changed

docs/src/tutorials/linear.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Let's check these are the same:
139139

140140
```@example linsys1
141141
v = rand(5)
142-
mfopA * v - A * v
142+
mfopA*v - A*v
143143
```
144144

145145
Notice `mfopA` does this without having to have `A` because it just uses the equivalent `Afunc!` instead. Now, even though

ext/LinearSolveEnzymeExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function EnzymeRules.reverse(config, func::Const{typeof(LinearSolve.solve!)},
227227
end
228228
else
229229
dlinsolves = linsolve.dval
230-
if any(x -> (iszero(x.A) || iszero(x.b)) && !iszero(x.u), linsolve.dval)
230+
if any(x->(iszero(x.A) || iszero(x.b)) && !iszero(x.u), linsolve.dval)
231231
error("Adjoint case currently not handled. Instead of using `solve!(cache); s1 = copy(cache.u) ...`, use `sol = solve!(cache); s1 = copy(sol.u)`.")
232232
end
233233
end

src/KLU/klu.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ import Base: (\), size, getproperty, setproperty!, propertynames, show,
1414
copy, eachindex, view, sortperm, unsafe_load, zeros, convert, eltype,
1515
length, parent, stride, finalizer, Complex, complex, imag, real, map!,
1616
summary, println, oneunit, sizeof, isdefined, setfield!, getfield,
17-
OutOfMemoryError, ArgumentError, OverflowError, ErrorException,
18-
DimensionMismatch
17+
OutOfMemoryError, ArgumentError, OverflowError, ErrorException, DimensionMismatch
1918

2019
# Convert from 1-based to 0-based indices
2120
function decrement!(A::AbstractArray{T}) where {T <: Integer}

src/generic_lufact.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Update the rest
5656
for j in (k + 1):n
5757
for i in (k + 1):m
58-
A[i, j] -= A[i, k] * A[k, j]
58+
A[i, j] -= A[i, k]*A[k, j]
5959
end
6060
end
6161
end
@@ -119,7 +119,7 @@ elseif VERSION < v"1.13"
119119
# Update the rest
120120
for j in (k + 1):n
121121
for i in (k + 1):m
122-
A[i, j] -= A[i, k] * A[k, j]
122+
A[i, j] -= A[i, k]*A[k, j]
123123
end
124124
end
125125
end

src/simplegmres.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ function SciMLBase.solve!(cache::SimpleGMRESCache{false}, lincache::LinearCache)
308308
# [cₖ sₖ] [ r̄ₖ.ₖ ] = [rₖ.ₖ]
309309
# [s̄ₖ -cₖ] [hₖ₊₁.ₖ] [ 0 ]
310310
(c[inner_iter], s[inner_iter],
311-
R[nr + inner_iter]) = _sym_givens(
311+
R[nr + inner_iter]) = _sym_givens(
312312
R[nr + inner_iter],
313313
Hbis)
314314

test/adjoint.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ A = rand(n, n);
3131
b1 = rand(n);
3232

3333
_ff = (x,
34-
y) -> f(x,
34+
y) -> f(x,
3535
y;
3636
alg = LinearSolve.DefaultLinearSolver(LinearSolve.DefaultAlgorithmChoice.LUFactorization))
3737
_ff(copy(A), copy(b1))

test/default_algs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ sol = solve(prob,
170170
@test sol.u == zeros(4)
171171

172172
sol = solve(prob)
173-
@test sol.u svd(A) \ b
173+
@test sol.u svd(A)\b

test/hypretests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function test_interface(alg; kw...)
8787

8888
# Solve prob directly (without cache)
8989
y = solve(prob, alg; cache_kwargs..., Pl = HYPRE.BoomerAMG)
90-
@test A * to_array(y.u)b atol=atol rtol=rtol
90+
@test A*to_array(y.u)b atol=atol rtol=rtol
9191
@test y.iters > 0
9292
@test y.resid < rtol
9393

@@ -99,7 +99,7 @@ function test_interface(alg; kw...)
9999
cache = y.cache
100100
@test cache.isfresh == cache.cacheval.isfresh_A ==
101101
cache.cacheval.isfresh_b == cache.cacheval.isfresh_u == false
102-
@test A * to_array(y.u)b atol=atol rtol=rtol
102+
@test A*to_array(y.u)b atol=atol rtol=rtol
103103

104104
# Update A
105105
cache.A = A
@@ -109,7 +109,7 @@ function test_interface(alg; kw...)
109109
cache = y.cache
110110
@test cache.isfresh == cache.cacheval.isfresh_A ==
111111
cache.cacheval.isfresh_b == cache.cacheval.isfresh_u == false
112-
@test A * to_array(y.u)b atol=atol rtol=rtol
112+
@test A*to_array(y.u)b atol=atol rtol=rtol
113113

114114
# Update b
115115
b2 = 2 * to_array(b)
@@ -123,7 +123,7 @@ function test_interface(alg; kw...)
123123
cache = y.cache
124124
@test cache.isfresh == cache.cacheval.isfresh_A ==
125125
cache.cacheval.isfresh_b == cache.cacheval.isfresh_u == false
126-
@test A * to_array(y.u)to_array(b2) atol=atol rtol=rtol
126+
@test A*to_array(y.u)to_array(b2) atol=atol rtol=rtol
127127
end
128128
return
129129
end

test/nopre/enzyme.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ b1 = rand(n);
3333
db1 = zeros(n);
3434

3535
_ff = (x,
36-
y) -> f(x,
36+
y) -> f(x,
3737
y;
3838
alg = LinearSolve.DefaultLinearSolver(LinearSolve.DefaultAlgorithmChoice.LUFactorization))
3939
_ff(copy(A), copy(b1))
4040

4141
Enzyme.autodiff(Reverse,
4242
(x,
43-
y) -> f(x,
43+
y) -> f(x,
4444
y;
4545
alg = LinearSolve.DefaultLinearSolver(LinearSolve.DefaultAlgorithmChoice.LUFactorization)),
4646
Duplicated(copy(A), dA),
@@ -174,7 +174,7 @@ db2 = zeros(n);
174174
Enzyme.autodiff(set_runtime_activity(Reverse), f3, Duplicated(copy(A), dA),
175175
Duplicated(copy(b1), db1), Duplicated(copy(b2), db2))
176176

177-
@test dAdA2 atol=5e-5
177+
@test dA dA2 atol=5e-5
178178
@test db1 db12
179179
@test db2 db22
180180

test/retcodes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ staticarrayalgs = (
8080
)
8181
@testset "StaticArray Success" begin
8282
A = Float64[1 2 3; 4 3.5 1.7; 5.2 1.8 9.7]
83-
A = A * A'
83+
A = A*A'
8484
b = Float64[2, 5, 8]
8585
prob1 = LinearProblem(SMatrix{3, 3}(A), SVector{3}(b))
8686
sol = solve(prob1)

0 commit comments

Comments
 (0)