Subject: | won't support 64bit indexing in PDL-2.007 |
Hi Maggie-
I just tested the latest developers release and PDL::Stats built and tested
fine on my win7/cygwin PDL install (test report is submitted). Now that
that is out of the way, I looked through some of the PP code and noticed
some usages that will definitely cause problems if someone uses a
64bit sized piddle.
See
http://mailman.jach.hawaii.edu/pipermail//pdl-porters/2013-September/005900.html
for a check list of things to look for and fix. The key is to avoid using int sized
variables for values that loop over index dimensions, offsets, of number of
elements or bytes. If you search the .pp files for long or int you'll find places
that may need a fix. E.g., in glm.pp lines:
151 long i, j;
164 j = (long) ((i-1) * (double)(rand()) / (double)(RAND_MAX) + .5);
216 long N = $SIZE(n);
228 long N = 0;
265 long N = $SIZE(n);
279 long N = 0;
363 long N = 0;
394 long N = $SIZE(n);
403 long N = 0;
480 long N = $SIZE(n);
493 long N = 0;
You get the idea. Still to come on the PDL main distribution side is support
for back-compatibility and portability (probably by adding something to PP
creating a compatibility type that works with older PDL versions). In the
meantime, you could also just put a runtime check for defined(&PDL::indx)
and issue a warning that 64bit support is not there yet....