LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Wolfgang

Clear2D, Set2D, Copy2D

Status: New

Hello,

 

the Advanced Analysis Library provides some convenient functions for array operations; unfortunately some of them are available only for the 1D case and not for twodimensional arrays. While it is no big deal to add a loop I suppose that these AAL functions are speed-optimized, something that cannot be achieved when using the native CVI compiler.

 

Hence I'd like to suggest the addition of functions Clear2D, Set2D, Copy2D

1 Comment
LuisG
NI Employee (retired)

Wolfgang,

 

I'm not sure I understand the suggestion. What would expect to see as the parameter of one of these functions (say, Clear2D), and how would you use it?

 

In C, you can't specify a 2D array as a parameter to a function, unless it has a fixed row size. For example, double array[][10] is a valid parameter declaration, but double array[][] isn't. This is because the row size has to be known at compile-time so that the compiler can generate the object code to index it correctly.

 

The general rule is that an n-dimensional array must have fixed length for the first n-1 dimensions.

 

Luis