Re: [PATCH v3 5/9] midx: refactor permutation logic and pack sorting
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jan 24, 2019, 19:17 UTC
- Message-ID
- <295eb5fb-5497-0517-a5ed-af96aafb3133@gmail.com>
- In-Reply-To
- <14fe05d0-75e5-0975-d490-550539dbb34a@gmail.com>
On 1/24/2019 12:34 PM, Derrick Stolee wrote:
Show 14 quoted lines
> On 1/23/2019 4:00 PM, Jonathan Tan wrote: >> Indeed, the sorting of pack_info is moved to after get_sorted_entries(). >> Also, pack_perm[old number] = new number, as expected. > > Thanks for chiming in with all the detail on the use of 'perm'. This > is the most confusing part of this code path. > >> I think a comment explaining why the perm is needed would be helpful - >> something explaining that the entries were generated using the old pack >> numbers, so we need this mapping to be able to write them using the new >> numbers. > > I can put this comment in the struct definition. Is that the right > place for it?
I mistakenly thought the pack_perm array was placed into the pack_list struct. I'll put the comment right before we populate the contents of the array.
Thanks, -Stolee