Subject: | PDL::NDBin does not support 64bit indexing |
A review of the PP and XS code for this distribution sugggests
that it does not support the coming 64bit indexing for PDL coming
with the PDL-2.007 release in final pre-releases.
Changes to support 64bit indexing entail removing assumptions
that index values, dimension extents and offsets are of 32bit types.
There is a new type defined (C type PDL_Indx, PDL perl type indx(),
...) that is defined to be the correct integer type for an index value
based on whether your perl supports 32bit or 64bit. This is determined
from the size and type of IV.
I took a look at your code, and it looks like changing int or long index
values to PDL_Indx in the C code, using indx instead of int in the
signatures, and using indx type in perl PDL code should fix the
problem but there is enough going on that I did not feel confident
in making the changes.
For backwards compatibiliyt, you can check defined(&PDL::indx)
at runtime to determine if the PDL you are building against has the
new 64bit support or not.
A more detailed write-up on how to convert robustly and portably
will come as the interface nuances are clarified. Please address
any questions or feedback to the pdl-porters mailing list so that
they can help us sort them out.
that it does not support the coming 64bit indexing for PDL coming
with the PDL-2.007 release in final pre-releases.
Changes to support 64bit indexing entail removing assumptions
that index values, dimension extents and offsets are of 32bit types.
There is a new type defined (C type PDL_Indx, PDL perl type indx(),
...) that is defined to be the correct integer type for an index value
based on whether your perl supports 32bit or 64bit. This is determined
from the size and type of IV.
I took a look at your code, and it looks like changing int or long index
values to PDL_Indx in the C code, using indx instead of int in the
signatures, and using indx type in perl PDL code should fix the
problem but there is enough going on that I did not feel confident
in making the changes.
For backwards compatibiliyt, you can check defined(&PDL::indx)
at runtime to determine if the PDL you are building against has the
new 64bit support or not.
A more detailed write-up on how to convert robustly and portably
will come as the interface nuances are clarified. Please address
any questions or feedback to the pdl-porters mailing list so that
they can help us sort them out.