Files
test/source/blender/functions
Jacques Lucke 2e4d2ad5ab Refactor: BLI: reduce code size for virtual arrays
Previously, `VArrayImpl` had a `materialize` and `materialize_to_uninitialized`
function. Now both are merged into one with an additional `bool
dst_is_uninitialized` parameter.  The same is done for the
`materialize_compressed` method as all as `GVArrayImpl`.

While this kind of merging is typically not ideal, it reduces the binary size by
~200kb while being basically free performance wise. The cost of this predictable
boolean check is expected to be negligible even if only very few indices are
materialized. Additionally, in most cases, this parameter does not even have to
be checked, because for trivial types it does not matter if the destination
array is already initialized or not when overwriting it.

It saves this much memory, because there are quite a few implementations being
generated with e.g. `VArray::from_func` and a lot of code was duplicated for
each instantiation.

This changes only the actual `(G)VArrayImpl`, but not the `VArray` and `GVArray`
API which is typically used to work with virtual arrays.

Pull Request: https://projects.blender.org/blender/blender/pulls/145144
2025-08-28 14:24:25 +02:00
..