Chris Marshall
2013-10-15 15:25:48 UTC
To PDL Developers-
With the official release of PDL-2.007 with 64bit indexing
support, there is a need to update existing PDL-based
modules to handle the now possibly 64bit values.
Ideally, all modules would be updated to handle builds
before and after the introduction of the new PDL_Indx
data type. The way to do that is to:
(1) Determine if you have PDL_Indx data support.
The easiest way is to load PDL and check if
defined(&indx).
(2) If not, the original code should work as before
(3) If so,you'll need to change places where your code
assumes that the PDL index value is a 32bit int
and replace it by PDL_Indx in C code, or the indx
type in perl/PDL code.
(4) Ideally, add tests for any new capability
(5) Document if your module is 64bit safe (builds and
runs) or 64bit capable (in the sense that you can
use 64bit piddle data and indexes/offsets)
My current plan is to keep CHM/PDL-2.006.tar.gz on
CPAN indefinitely (which means until all the existing
external code is updated). Given that fact, you can
also require your module to use no version of PDL
greater than 2.006. That would work around the problem
in a technical sense but you could lose the planned
enhancements in type support... coming.
It would be useful for someone to write some sort of
adapter code that could be used to simplify the update
or even automate the compatibility entirely. As always
code and patches are welcome.
Regards,
Chris
With the official release of PDL-2.007 with 64bit indexing
support, there is a need to update existing PDL-based
modules to handle the now possibly 64bit values.
Ideally, all modules would be updated to handle builds
before and after the introduction of the new PDL_Indx
data type. The way to do that is to:
(1) Determine if you have PDL_Indx data support.
The easiest way is to load PDL and check if
defined(&indx).
(2) If not, the original code should work as before
(3) If so,you'll need to change places where your code
assumes that the PDL index value is a 32bit int
and replace it by PDL_Indx in C code, or the indx
type in perl/PDL code.
(4) Ideally, add tests for any new capability
(5) Document if your module is 64bit safe (builds and
runs) or 64bit capable (in the sense that you can
use 64bit piddle data and indexes/offsets)
My current plan is to keep CHM/PDL-2.006.tar.gz on
CPAN indefinitely (which means until all the existing
external code is updated). Given that fact, you can
also require your module to use no version of PDL
greater than 2.006. That would work around the problem
in a technical sense but you could lose the planned
enhancements in type support... coming.
It would be useful for someone to write some sort of
adapter code that could be used to simplify the update
or even automate the compatibility entirely. As always
code and patches are welcome.
Regards,
Chris