Mercurial > repos > public > sbplib_julia
comparison test/testLazyTensors.jl @ 536:fc0f942b8792 feature/inflated_tensormapping_transpose
Merge in default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 26 Nov 2020 17:21:38 +0100 |
parents | 588a843907de dfad4c16bedb |
children | 62d96e2cd165 |
comparison
equal
deleted
inserted
replaced
533:aac7cc1fa79a | 536:fc0f942b8792 |
---|---|
362 @inferred range_size(InflatedTensorMapping(I(3,2), A, I(4))) == (3,2,4,4) | 362 @inferred range_size(InflatedTensorMapping(I(3,2), A, I(4))) == (3,2,4,4) |
363 @inferred domain_size(InflatedTensorMapping(I(3,2), A, I(4))) == (3,2,2,4) | 363 @inferred domain_size(InflatedTensorMapping(I(3,2), A, I(4))) == (3,2,2,4) |
364 end | 364 end |
365 | 365 |
366 @testset "Application" begin | 366 @testset "Application" begin |
367 # Testing regular application and transposed application with inflation "before", "after" and "before and after". | |
368 # The inflated tensor mappings are chosen to preserve, reduce and increase the dimension of the result compared to the input. | |
367 tests = [ | 369 tests = [ |
368 ( | 370 ( |
369 InflatedTensorMapping(I(3,2), A, I(4)), | 371 InflatedTensorMapping(I(3,2), A, I(4)), |
370 (v-> @tullio res[a,b,c,d] := Ã[c,i]*v[a,b,i,d]), # Expected result of apply | 372 (v-> @tullio res[a,b,c,d] := Ã[c,i]*v[a,b,i,d]), # Expected result of apply |
371 (v-> @tullio res[a,b,c,d] := Ã[i,c]*v[a,b,i,d]), # Expected result of apply_transpose | 373 (v-> @tullio res[a,b,c,d] := Ã[i,c]*v[a,b,i,d]), # Expected result of apply_transpose |