Skip to content

Draft: Split DoComputeScalarRange template across TUs

David Gobbi requested to merge dgobbi/vtk:compute-scalar-range-split into master

The scalar range computation code for vtkDataArray is templated quite heavily, not only over type but also over the number of components. This caused the vtkDataArray.cxx compilation to consume several gigabytes of RAM. Splitting the template instantiations over several .cxx files helps compilation on low-memory systems.

This MR is not merge-able as-is, because it replicates some template/macro logic already present in vtkGenericDataArray, but it demonstrates a path forward to reduce compiler memory usage.

Closes: #18259 (closed)

Edited by David Gobbi

Merge request reports