Tpetra::CrsGraph: Merge makeIndicesLocal, sortAllIndices, & mergeAllIndices into a single host-thread-parallel function
Created by: mhoemmen
@trilinos/tpetra
All three methods makeIndicesLocal, sortAllIndices, and mergeAllIndices iterate over all entries of the CrsGraph. See #834 (closed) for sortAllIndices and mergeAllIndices. It would also make sense to merge makeIndicesLocal into those two parallel loops.
It would be better for makeIndicesLocal always to put the graph into StaticProfile. Right now, if the graph enters makeIndicesLocal with DynamicProfile, it stays DynamicProfile (but leaves locally indexed). This implies extra copies and allocations. The makeIndicesLocal method only ever gets called in fillComplete (or fillComplete-like methods), so the graph will become StaticProfile anyway. Why not go straight to StaticProfile in makeIndicesLocal?