comparison src/LazyTensors/lazy_tensor_operations.jl @ 379:de4746d6d126

Add some notes and todos
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 30 Sep 2020 21:30:29 +0200
parents 946516954c85
children 1936e38fe51e
comparison
equal deleted inserted replaced
378:946516954c85 379:de4746d6d126
11 t::TM 11 t::TM
12 o::AA 12 o::AA
13 end 13 end
14 # TODO: Do boundschecking on creation! 14 # TODO: Do boundschecking on creation!
15 export LazyTensorMappingApplication 15 export LazyTensorMappingApplication
16
17 # TODO: Go through and remove unneccerary type parameters on functions
16 18
17 Base.:*(tm::TensorMapping{T,R,D}, o::AbstractArray{T,D}) where {T,R,D} = LazyTensorMappingApplication(tm,o) 19 Base.:*(tm::TensorMapping{T,R,D}, o::AbstractArray{T,D}) where {T,R,D} = LazyTensorMappingApplication(tm,o)
18 Base.getindex(ta::LazyTensorMappingApplication{T,R,D}, I::Vararg{Index,R}) where {T,R,D} = apply(ta.t, ta.o, I...) 20 Base.getindex(ta::LazyTensorMappingApplication{T,R,D}, I::Vararg{Index,R}) where {T,R,D} = apply(ta.t, ta.o, I...)
19 Base.getindex(ta::LazyTensorMappingApplication{T,R,D}, I::Vararg{Int,R}) where {T,R,D} = apply(ta.t, ta.o, Index{Unknown}.(I)...) 21 Base.getindex(ta::LazyTensorMappingApplication{T,R,D}, I::Vararg{Int,R}) where {T,R,D} = apply(ta.t, ta.o, Index{Unknown}.(I)...)
20 Base.size(ta::LazyTensorMappingApplication) = range_size(ta.t) 22 Base.size(ta::LazyTensorMappingApplication) = range_size(ta.t)