10-24-2013 04:23 AM
Hi,
Trying to improve the performance of a program i want to parallellize a loop. This loop uses a vi which returns an array, and i assume this can be of different lengths each iteration. The current solution is a classic Concatenate arrays via shift register disallowing parallellization, but there should be some workaround, right?
/Y
Solved! Go to Solution.
10-24-2013 04:58 AM
Hi Yamaeda,
whenever you need to concat elements in an array in a loop you need a shift register, either by BuildArray or ReplaceArraySubset (with a predefined array)...
One possible workaround: When the arrays from your subVI differ in length you should put them in a cluster. So you can use autoindexing to build an array of cluster of array - with the disadvantage of needing another loop to concatenate the subArrays later on...
Is it worth it?
10-24-2013 05:46 AM
Yeah, that's a good solution, i'll give it a try! If it's worth it? Well the sub-vi does some analysis which should take some time, this is more of a check for possible routes to speed it up. 🙂
/Y
10-24-2013 10:40 AM - edited 10-24-2013 10:41 AM
@Yamaeda wrote:
The current solution is a classic Concatenate arrays via shift register disallowing parallellization, but there should be some workaround, right?
If you use the concatenating tunnel, the second loop can be parallelized just fine. 😄
10-24-2013 02:04 PM - edited 10-24-2013 02:05 PM
10-24-2013 02:47 PM
Good point Old creek. However i'm sitting with 2010 right now. It sure improves parallellizability in general though!
/Y