Mesh: Reimplement and unify topology maps #107861

Merged
Hans Goudey merged 14 commits from HooglyBoogly/blender:cleanup-unify-mesh-maps into main 2023-05-24 13:17:03 +02:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit 35bef167cc - Show all commits

View File

@ -96,6 +96,9 @@ template<typename T> class OffsetIndices {
* References many separate spans in a larger contiguous array. This gives a more efficient way to
* store many grouped arrays, without requiring many small allocations, giving the general benefits
* of using contiguous memory.
*
* \note If the offsets are shared between many #GroupedSpan objects, it will still

My only very small concern with this type is that some might use multiple GroupSpan which all use the same offsets. In this case, it would be more efficient to lookup the range from the offsets only once. This is still possible of course, just a little less obvious.

My only very small concern with this type is that some might use multiple `GroupSpan` which all use the same `offsets`. In this case, it would be more efficient to lookup the range from the offsets only once. This is still possible of course, just a little less obvious.

Yeah, good point. Probably not necessary but I added a note in the classes description mentioning that.

Yeah, good point. Probably not necessary but I added a note in the classes description mentioning that.
* be more efficient to retrieve the #IndexRange only once and slice each span.
*/
template<typename T> struct GroupedSpan {
OffsetIndices<int> offsets;