Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 1789:48eaa973159a refactor/lazy_tensors/elementwise_ops
Add TBD
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 25 Sep 2024 10:31:09 +0200 |
parents | 8b64df6cadba |
children | 368999a2e243 |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Wed Sep 25 10:25:30 2024 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Wed Sep 25 10:31:09 2024 +0200 @@ -64,6 +64,12 @@ return new{Op,T,R,D,TT}(tms) end end +# TBD: Can we introduce negation of LazyTensors? It could be done generically +# with a ScalingTensor but also using specializations for specific tensor +# types. This would allow simplification of ElementwiseTensorOperation to +# TensorSum. The implementation of `-` can be done using negation and the +# TensorSum type. We should make sure this doesn't impact the efficiency of +# for example SATs. function ElementwiseTensorOperation{:+}(ts::Vararg{LazyTensor})