flow from jit.matrix A to jit.matrix B, but ignore plane X from jit.matrix A
...if that makes sense? :)
In other words, I have stuff going on already in plane X in matrix B. Now I want to add to that everything from matrix A except its plane X.
I think I can do this with jit.op, but I would have to pass both matrices A and B through it and create a third matrix C.
Is there a way I can do it without having to create a third matrix?
Could you use [jit.unpack] to grab the planes you want from matrix A?
yeah, but then I still have to unpack the one plane I want from matrix B, and then pack them all into a third matrix C.
I'm actually going ahead with using a 3rd matrix, seems like it's the easiest way.
You can do it with jit.op with a multi-plane op attribute, which is probably the most expedient and efficient. If your concern is parsimonious use of memory, you can use a named matrix to do the addition in-place.
you could also do this with a single jit.pack, using the offset and jump attributes: