flow from jit.matrix A to jit.matrix B, but ignore plane X from jit.matrix A

Jul 14, 2012 at 11:51am

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?

#35913
Jul 14, 2012 at 12:42pm

Could you use [jit.unpack] to grab the planes you want from matrix A?

#123036
Jul 14, 2012 at 12:52pm

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.

#123037
Jul 15, 2012 at 12:59am

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.

– Pasted Max Patch, click to expand. –
#123038
Jul 16, 2012 at 4:22pm

you could also do this with a single jit.pack, using the offset and jump attributes:

– Pasted Max Patch, click to expand. –
#123039

You must be logged in to reply to this topic.