Skip to content

Commit

Permalink
🤖 Format .jl files (#357)
Browse files Browse the repository at this point in the history
Co-authored-by: tmigot <[email protected]>
  • Loading branch information
github-actions[bot] and tmigot authored Dec 14, 2024
1 parent 6d6a53b commit 88f225c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ext/LinearOperatorsMetalExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ isdefined(Base, :get_extension) ? (using Metal) : (using ..Metal)

LinearOperators.storage_type(::MtlArray{T, 2, S}) where {T, S} = MtlArray{T, 1, S}

end # module
end # module
2 changes: 1 addition & 1 deletion test/gpu/jlarrays.jl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test_S_kwarg(arrayType = JLArray)
test_S_kwarg(arrayType = JLArray)
2 changes: 1 addition & 1 deletion test/gpu/metal.jl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
using Metal
test_S_kwarg(arrayType = MtlArray, notMetal = false)
test_S_kwarg(arrayType = MtlArray, notMetal = false)
11 changes: 7 additions & 4 deletions test/gpu/test_S_kwarg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function test_S_kwarg(; arrayType, notMetal = true)
@test LinearOperators.storage_type(LinearOperator(Symmetric(mat); S = vecT)) == vecT
#notMetal && @test LinearOperators.storage_type(LinearOperator(SymTridiagonal(Symmetric(mat)); S = vecT)) == vecT
@test LinearOperators.storage_type(LinearOperator(Hermitian(mat); S = vecT)) == vecT
@test LinearOperators.storage_type(LinearOperator(Float32, 32, 32, true, true, () -> 0; S = vecT)) == vecT
@test LinearOperators.storage_type(
LinearOperator(Float32, 32, 32, true, true, () -> 0; S = vecT),
) == vecT

# special-operators.jl
@test LinearOperators.storage_type(opEye(Float32, 32; S = vecT)) == vecT
Expand All @@ -36,7 +38,8 @@ function test_S_kwarg(; arrayType, notMetal = true)
@test LinearOperators.storage_type(opExtension([1, 2, 3], 32; S = vecT)) == vecT

@test LinearOperators.storage_type(BlockDiagonalOperator(mat, mat)) == vecT # default
notMetal && @test LinearOperators.storage_type(BlockDiagonalOperator(mat, mat; S = vecTother)) == vecTother
notMetal &&
@test LinearOperators.storage_type(BlockDiagonalOperator(mat, mat; S = vecTother)) ==
vecTother
end

end
end
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ include("test_solve_shifted_system.jl")
include("gpu/test_S_kwarg.jl")
include("gpu/jlarrays.jl")
if Sys.isapple() && occursin("arm64", Sys.MACHINE)
include("gpu/metal.jl")
include("gpu/metal.jl")
end

0 comments on commit 88f225c

Please sign in to comment.