cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

Running Sum with array functions only

Resolvido!
Ir para a solução

DaIn wrote:

  I only wanted to be sure, that there is no faster way to do this operation in Labview.


Maybe you want to flatten the loop code to the main diagram to avoid the subVI call overhead. Make sure to disable debugging.

 

If you want to keep it as a subVI, at least inline it.

0 Kudos
Mensagem 11 de 17
2.444Exibições

@Yamaeda wrote:

For a running sum, especially on a large array you'll only need to keep the previous sum and add the new number, no need to recalculate the previous values that'll be constant.


I think that's what the code shown in the first post is already doing. Right?

0 Kudos
Mensagem 12 de 17
2.443Exibições

@altenbach wrote:

@Yamaeda wrote:

For a running sum, especially on a large array you'll only need to keep the previous sum and add the new number, no need to recalculate the previous values that'll be constant.


I think that's what the code shown in the first post is already doing. Right?


Yes, i just got the impression the complete array was calculated each time, not just additions.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Mensagem 13 de 17
2.429Exibições

I will need the function as a subVI.

Disabling debugging and inline the execution is a good hint. Thanks.

 

 

Mensagem 14 de 17
2.408Exibições

If you want this to be as fast as possible, why not do the running sum inside of the FPGA?  The FPGA can do it in a single cycle and it will always be up to date with the last value read.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Mensagem 15 de 17
2.388Exibições

I need both data informations. 
Once i need the deltas and on another place i need the the running sum.

And transfering both arrays from FPGA to the Host requires more time or more DMA channels.

 

So this is no option. But thanks for your reply.

0 Kudos
Mensagem 16 de 17
2.380Exibições
Solução
Aceita por DaIn

Also remember that if this needs to be done very often, you could pipeline the execution such that multiple CPUs work on successive, overlapping problems, i.e. the next computation starts wile another CPU is still ading elements of the previous problem.

 

On a typical quad core processor, you could go up to 4x faster.

0 Kudos
Mensagem 17 de 17
2.368Exibições