Mercurial > repos > public > sbplib_julia
diff test/LazyTensors/lazy_tensor_operations_test.jl @ 1296:97dfca9ec054 performance/lazy_tensors
Add inference test
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 05 Oct 2022 13:56:21 +0200 |
parents | 2e606d4c0ab1 |
children |
line wrap: on
line diff
--- a/test/LazyTensors/lazy_tensor_operations_test.jl Wed Oct 05 13:15:32 2022 +0200 +++ b/test/LazyTensors/lazy_tensor_operations_test.jl Wed Oct 05 13:56:21 2022 +0200 @@ -189,6 +189,16 @@ @test range_size(a*Ã) == range_size(Ã) @test domain_size(a*Ã) == domain_size(Ã) @test a*Ã*v == a.*A*v + + @testset "Inference of application" begin + tm = Ã∘B̃ + v = rand(4) + + @inferred apply(tm,v,1) + @inferred apply(tm,v,2) + @inferred (tm*v)[1] + @inferred (tm*v)[2] + end end