Mercurial > repos > public > sbplib_julia
comparison test/testLazyTensors.jl @ 496:f906f207571c feature/avoid_nested_inflated_tensormappings
Merge default and close branch before merge
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 05 Nov 2020 15:17:46 +0100 |
parents | df566372bb4f cd509e57f898 |
children | 5a600ec40ccc |
comparison
equal
deleted
inserted
replaced
493:df566372bb4f | 496:f906f207571c |
---|---|
10 struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end | 10 struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end |
11 LazyTensors.apply(m::DummyMapping{T,R,D}, v, i::NTuple{R,Index{<:Region}}) where {T,R,D} = :apply | 11 LazyTensors.apply(m::DummyMapping{T,R,D}, v, i::NTuple{R,Index{<:Region}}) where {T,R,D} = :apply |
12 @test range_dim(DummyMapping{Int,2,3}()) == 2 | 12 @test range_dim(DummyMapping{Int,2,3}()) == 2 |
13 @test domain_dim(DummyMapping{Int,2,3}()) == 3 | 13 @test domain_dim(DummyMapping{Int,2,3}()) == 3 |
14 @test apply(DummyMapping{Int,2,3}(), zeros(Int, (0,0,0)),(Index{Unknown}(0),Index{Unknown}(0))) == :apply | 14 @test apply(DummyMapping{Int,2,3}(), zeros(Int, (0,0,0)),(Index{Unknown}(0),Index{Unknown}(0))) == :apply |
15 @test eltype(DummyMapping{Int,2,3}()) == Int | |
16 @test eltype(DummyMapping{Float64,2,3}()) == Float64 | |
15 end | 17 end |
16 | 18 |
17 @testset "Mapping transpose" begin | 19 @testset "Mapping transpose" begin |
18 struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end | 20 struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end |
19 | 21 |