Skip Menu |

This queue is for tickets about the PDL-NDBin CPAN distribution.

Report information
The Basics
Id: 88863
Status: open
Priority: 0/
Queue: PDL-NDBin

People
Owner: EBAUDREZ [...] cpan.org
Requestors: chm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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.
On Sat Sep 21 13:29:28 2013, CHM wrote: Show quoted text
> 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.
Thank you for your report. Indeed, PDL::NDBin does not yet support 64-bit PDL. I need to work on this :-)
Ok, with PDL::NDBin 0.014 I've released a version which finally tests and installs fine on PDL 2.007 or later (2.007_02 at the moment). So it's definitely 64-bit "safe" by now. But I haven't had time to extensively test it with huge data, so I'll leave the ticket open for a while. Thank you for your report and suggested fixes! Best regards Edward On Mon Sep 23 14:47:36 2013, EBAUDREZ wrote: Show quoted text
> On Sat Sep 21 13:29:28 2013, CHM wrote:
> > 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.
> > > Thank you for your report. Indeed, PDL::NDBin does not yet support 64- > bit PDL. I need to work on this :-)