> So I's assume transposing 2D-arrays is in-place. > I was surprised, however, where the 3rd copy of the data occured or where > it went to. No extra buffer allocation (black dot) was visibel anywhere. > Maybe Greg or someone else from NI can shed some light? >
I wasn't around when the original Transpose was written, but I believe that it was one of the first nodes to be made to be inplace. It does have one extra element and is inplace. I suspect that the results that found an extra copy being made were being affected by constant-folding. If you build a VI that has nothing but constants wired to build array, this is equivalent to wiring up a constant array. No problem yet, but constants cannot be overwritten, thus even though Transpose is inplace, it modifies the data, and a copy must be made to avoid modifying the constant. If you one of the inputs to Build Array be a control, then this data will be generated each time and you should see that no additional data buffers are needed when a Transpose is inserted. Of course, you may be wondering why the Transpose node doesn't run at constant-folding time, require no additional runtime data nor any runtime execution time. I believe it will soon along with lots of other nodes. Greg McKaskle
