Mercurial > repos > public > sbplib_julia
changeset 2087:ebf0c1686eba refactor/sbp_operators/direction_check
Merge default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Mon, 02 Mar 2026 13:52:39 +0100 |
| parents | 0f949681d3d3 (current diff) 53e5887457b9 (diff) |
| children | 438dc7664c1f |
| files | |
| diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Fri Feb 20 12:01:05 2026 +0100 +++ b/src/LazyTensors/lazy_tensor_operations.jl Mon Mar 02 13:52:39 2026 +0100 @@ -99,15 +99,19 @@ end function apply(tmBinOp::TensorSum{T,R,D}, v::AbstractArray{<:Any,D}, I::Vararg{Any,R}) where {T,R,D} - return sum(tmBinOp.tms) do tm + vs = map(tmBinOp.tms) do tm apply(tm,v,I...) end + + return +(vs...) end function apply_transpose(tmBinOp::TensorSum{T,R,D}, v::AbstractArray{<:Any,D}, I::Vararg{Any,R}) where {T,R,D} - return sum(tmBinOp.tms) do tm + vs = map(tmBinOp.tms) do tm apply_transpose(tm,v,I...) end + + return +(vs...) end range_size(tmBinOp::TensorSum) = range_size(tmBinOp.tms[1])
