08-11-2023 11:23 AM
Is there a function that would let me quickly get the sum of all elements in a 1D array? I could iterate through all of the elements, but that would be both inefficient to code and to execute. Is there a more convenient way to do so?
I need to implement this on an FPGA, BTW.
08-11-2023 11:44 AM
Use Index Array and Compound Add?
Might not be user friendly if you have many elements but you cannot have an array of dynamic size in FPGA anyway.
08-11-2023 11:50 AM - edited 08-11-2023 11:51 AM
Try this below.
#GodIsGood
08-11-2023 11:58 AM
I was hoping to try that but I couldn't find the Add Array Elements VI anywhere.
08-11-2023 12:03 PM
Add them as they are being collected or stored to the array. This is the 'FPGA' way of doing things. The 'software' way is to collect the data and then sum them. (I am generalizing)
08-11-2023 12:24 PM
@GRCK5000 wrote:
Try this below.
You probably missed the (FPGA) term in the subject. 😄
There is no such function, either in the FPGA numeric or in the FPGA array palette.