Skip to content

Commit eae653a

Browse files
committed
Test with Adjoint
1 parent 3558ff2 commit eae653a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/adjtrans.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,8 +762,14 @@ end
762762
end
763763
end
764764
@testset "inference for structured matrices" begin
765-
v = @inferred ((A,i) -> Val(A'[LinearAlgebra.BandIndex(0,i)]))(A,1)
765+
function f(A, i, ::Val{band}) where {band}
766+
x = Adjoint(A)[LinearAlgebra.BandIndex(band,i)]
767+
Val(x)
768+
end
769+
v = @inferred f(A, 1, Val(0))
766770
@test v == Val(1)
771+
v = @inferred f(A, 1, Val(1))
772+
@test v == Val(0)
767773
end
768774
@testset "non-square matrix" begin
769775
r = reshape(1:6, 2, 3)

0 commit comments

Comments
 (0)