08-31-2009 10:17 AM
Hi all,
I'm trying to determine the most feasible way of using an array constant in a lookup table manner. The array can be calculated based on the element indices (it is a modification of the Hilbert Transform). This array can be any size (but must be square).
There are two ways I can do this; 1) insert an array constant with a large number of elements ~4000x4000 (would be largest needed) and get the subset required for my transform or 2) determine the array size and generate the elements in a mathscript or other method. A 4000x4000 array is currently taking about 800 milliseconds to generate.
I am wondering which is most efficient, does a large constant array take up much of the available resources? I would most likely do a combination of the above whereby if the number of elements in the constant is not enough I'd generate the missing ones.
Another query and is probably very simple and basic, but if I start with a small array constant and then generate a larger one can I make this larger array the initial constant the next time the vi is called?
Regards,
Leeser
08-31-2009 12:53 PM
08-31-2009 01:04 PM
Leeser wrote:Another query and is probably very simple and basic, but if I start with a small array constant and then generate a larger one can I make this larger array the initial constant the next time the vi is called?
You would keep the array in an uninitialized shift register or feedback node and update it only if the input change and once at the start of the program. A 4000x4000 array of DBL is very large and needs contiguous memory. You need to code carefully to avoid extra data copies and resizing operations.