Mercurial > repos > public > sbplib_julia
changeset 192:4799bc46eaa9 boundary_conditions
Remove assert in Lazy.jl. Add todo for fixing the bounds checking in getindex methods
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 20 Jun 2019 23:02:37 +0200 |
parents | 25d2ef206fe9 |
children | 2d97c54fd1f1 |
files | LazyTensors/src/Lazy.jl |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/LazyTensors/src/Lazy.jl Thu Jun 20 23:00:05 2019 +0200 +++ b/LazyTensors/src/Lazy.jl Thu Jun 20 23:02:37 2019 +0200 @@ -9,15 +9,13 @@ b::T2 function LazyElementwiseOperation{T,D,Op}(a::T1,b::T2) where {T,D,Op, T1<:AbstractArray{T,D}, T2<:AbstractArray{T,D}} - #TODO: Remove assert? Asserts are not removed when compiling with - # optimization flags. If so, need to handle boundschecking proparly. - @assert size(a) == size(b) return new{T,D,Op,T1,T2}(a,b) end end Base.size(v::LazyElementwiseOperation) = size(v.a) +# TODO: Make sure boundschecking is done properly and that the lenght of the vectors are equal # NOTE: Boundschecking in getindex functions now assumes that the size of the # vectors in the LazyElementwiseOperation are the same size. If we remove the # size assertion in the constructor we might have to handle