LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select indices/part of array with help of other array

Provided LV does not fold the structure (since It can cheat and say this is hte same everytime and turn it into a constant) the issue LV does not know how many times a While loop will execute so I it cannot preallocate so ... performance hit.

 

If you have to build in an array in  a while loop preallocated and use replace array subset.

 

If can't guess at the exact size over-allocate and the use reshape array when you are done (on the final array) to truncate it.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 12
(232 Views)

@Ben wrote:

 

If you have to build in an array in  a while loop preallocated and use replace array subset.

 

If can't guess at the exact size over-allocate and the use reshape array when you are done (on the final array) to truncate it.

 

Ben


That's quite all right.  As I said, I have no need to ever build an array with a While loop.  I was just curious.  Thanks for your insight.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 12 of 12
(220 Views)