LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what is the purpose of using parallelism and chunk in for loop

hai iam new to LabVIEW pls help me to learn. my question is what is the function of parallel loop iteration and chunk size in for loop
0 Kudos
Message 1 of 5
(3,000 Views)

Nowaday CPUs are multicores. You can speed up for loop operations, if you do it parallel, for example in case of a huge array.

more info:

http://www.ni.com/tutorial/9393/en/

Message 2 of 5
(2,979 Views)

Have you tried pressing the help button on the parallelism configuration page? You also already got a good link above.

 

If the outputs of each iteration are independent of each other, the compiler can spread the problem over multiple CPU cores, calculating several iterations in parallel, then assembling the result at the end in the correct order. Typically, the way the problem is split over multiple CPU cores is automatic and you don't need to worry about it. In very rare cases you might want better control and define the chunk size directly.

 

Note that the splitting and re-assembling introduces a certain amount of overhead so you should do some careful benchmarking to ensure that the process is worth it compared to serial execution in a plain FOR loop.

Message 3 of 5
(2,954 Views)
Thanks for your explaination
0 Kudos
Message 4 of 5
(2,897 Views)

@Cheguevara wrote:
Thanks for your explaination

Thanks are given with Kudos, and marking solutions.

 

https://decibel.ni.com/content/docs/DOC-40451

0 Kudos
Message 5 of 5
(2,869 Views)