I've been simplifying some patches with jit.expr, and I'd like to use specific scalar cell values from an input matrix within the calculations. Is there a simple way to do this? The only way I have been able is by making a separate matrix that takes getcell messages and outputs to additional inputs of a jit.expr object. Such a method works, but seems very wasteful to me. It's also not easy to expand to multiple simultaneous cells without making a new matrix for finding each value needed. Is there a way of doing this inside the jit.expr itself?
For example, with a 1D vector I want the value when cell==50
Initially I tried "sum((cell==50)*in(0))", but found there was no summation command.
Here is a simple patch to hopefully explain visually.