#80 better rle() output size handling and documentation

None
closed
None
5
2016-10-22
2014-02-20
No

In order to support PDL threading the rle() routine returns its results with the same size as the input pdl data. That makes threaded computations work at the expense of extra memory usage. In fact, the rld() routine takes care to allocate the maximum possible size to handle all the input rle-encoded data for threaded output.

Because of the rle() fixed output size, the common use case of processing a 1-D piddle requires an extra step to determine where the valid rle() output data is and this is non-intuitive and a bit of a pain for 1-D data. In addition, the docs don't clearly state how to calculate the number of good elements.

If rle() by default returned the smallest possible output data dimensions by truncating to the maximum size < n over the thread dimensions, then the obvious 1-D example would behave more intuitively.

Discussion

  • Derek Lamb

    Derek Lamb - 2016-09-29
    • status: open --> pending
    • Group: -->
     
  • Derek Lamb

    Derek Lamb - 2016-09-29

    Please check branch sf080_rle and if that has the desired behavior I will merge into master before 2.017 code freeze.

     
  • Chris Marshall

    Chris Marshall - 2016-10-22
    • status: pending --> closed
    • assigned_to: Derek Lamb
     
  • Chris Marshall

    Chris Marshall - 2016-10-22

    Fixed in PDL 2.017. Thanks, Derek.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks