Hello everyone, PDL::Parallel::threads has users! Who knew?? And apparently they've encountered problems!
The problem is that PDL::Parallel::threads won't compile after Ed's commit ee1ca955be <https://github.com/PDLPorters/pdl/commit/ee1ca955be> on September 14, 2021. That commit changed the pdl data structure's "trans" member to "trans_parent." The name change clarifies the meaning of the struct field and I like it. The reason this is a problem is that it provides a quick way to check if a piddle is a slice or not: non-null means slice. PDL::Parallel::threads can only share data from piddles that actually own their data, so I check before sharing. No problem, I'll just write code using two different names and pick the right one using #if PDL_VERSION < whatever. This way my code can be compiled against both older and new PDLs..... wait a second, we don't appear to #define the PDL version anywhere. Hrmph. Of course, if pressed, I could change my threads.xs file to be threads.xs.PL, and check the actual version number of PDL, or I could modify my Build script to check the PDL version and patch the xs file. But both of those seem overhanded. Does PDL provide a preprocessor macro with this information? Thanks! David -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-devel