Mercurial > repos > public > sbplib_julia
comparison src/LazyTensors/lazy_tensor_operations.jl @ 438:907b0510699f
Change LazyTensorTranspose to have concrete fields
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 19 Oct 2020 21:09:11 +0200 |
parents | cffdac9c612d |
children | 00c317c9ccfb |
comparison
equal
deleted
inserted
replaced
437:c3aa4ede899c | 438:907b0510699f |
---|---|
38 | 38 |
39 If a mapping implements the the `apply_transpose` method this allows working with | 39 If a mapping implements the the `apply_transpose` method this allows working with |
40 the transpose of mapping `m` by using `m'`. `m'` will work as a regular TensorMapping lazily calling | 40 the transpose of mapping `m` by using `m'`. `m'` will work as a regular TensorMapping lazily calling |
41 the appropriate methods of `m`. | 41 the appropriate methods of `m`. |
42 """ | 42 """ |
43 struct LazyTensorMappingTranspose{T,R,D} <: TensorMapping{T,D,R} | 43 struct LazyTensorMappingTranspose{T,R,D, TM<:TensorMapping{T,R,D}} <: TensorMapping{T,D,R} |
44 tm::TensorMapping{T,R,D} | 44 tm::TM |
45 end | 45 end |
46 export LazyTensorMappingTranspose | 46 export LazyTensorMappingTranspose |
47 | 47 |
48 # # TBD: Should this be implemented on a type by type basis or through a trait to provide earlier errors? | 48 # # TBD: Should this be implemented on a type by type basis or through a trait to provide earlier errors? |
49 # Jonatan 2020-09-25: Is the problem that you can take the transpose of any TensorMapping even if it doesn't implement `apply_transpose`? | 49 # Jonatan 2020-09-25: Is the problem that you can take the transpose of any TensorMapping even if it doesn't implement `apply_transpose`? |