02-27-2010 03:42 AM
Hi all!
Here a some code from C:\Program Files\National Instruments\LabVIEW 2009\CCodeGen\libsrc\lvanalysis\arrresize.c
NumericArrayResize function:
if (! *ap) return mgArgErr;
p = **ap;
arr = (int32 *)p;
if (n == 0 && *ap == NULL) {
*ap = (UHandle)DSNewHClr( (size_t)(nd * sizeof(int32)) );
if (! *ap) {
SetError(kArresizeModNum, kMemFail);
return mFullErr;
}
return noErr;
}
Does anybody see an error?
And here NumericArrayResize (CIN Function):
If *dataHP is NULL, LabVIEW allocates a new array handle in *dataHP.
02-27-2010 08:20 AM
this is ok:
p = **ap;
arr =(int32 *)p;
but here I'm weeping:
if ((dt == doubleDataType || dt == cmplx128DataType) && (nd % 2)) {
newSize += 4; //allow for 8 byte alignment of doubles
}
02-27-2010 08:28 AM
are you sure that int32 is a valid identifier in CVI?
02-27-2010 08:33 AM
02-27-2010 08:50 AM
02-27-2010 09:01 AM
You are in part right! But all this functions developed to use in CVI. See the forum please.
02-27-2010 12:08 PM - edited 02-27-2010 12:08 PM
If somebody bring me that LabWindows/CVI has NumericArrayResize implementation which is differ from LabView's one, I'll move the post with a Bug to LabView's branch immediately.
03-01-2010 02:58 PM
Hey Kolan,
I did some searching on the CCodeGen directory as I don't have this or the file here on my machine so I could test the behavior. It looks like this directory is usually present, however, if you are using any of our LabVIEW Embedded products such as LV for ARM, LV for Blackfin, or Microprocessor SDK. If this is the case, then there is actually another forum where they should be able to help you further. Here is the link:
LabVIEW Embedded Forum
http://forums.ni.com/ni/board?board.id=420
Lars
03-02-2010 06:23 AM
Lars_L, Thanks! The topic continues here.