Skip to content

Change Fetches to use ThreadIndices instead of Invocation.

Kenneth Moreland requested to merge kmorel/vtk-m:shared-indices-in-fetch into master

Previously, all Fetch objects received an Invocation object in their Load and Store methods. The point of this was that it allowed the Fetch to get data from any of the execution objects. However, every Fetch either just got data directly from its associated execution object or else used a secondary execution object (the input domain) to get indices into their own execution object.

This left two potential areas for improvement. First, pulling data out of the Invocation object was unnecessarily complicated. It would be much nicer to get data directly from the associated execution object. Second, when getting index information from the input domain, it was often the case that extra computations were necessary (particularly on structured cell sets). There was no way to share the index information among Fetches, and therefore the computations were replicated.

This change removes the Invocation from the Fetch Load and Store. Instead, it passes the associated execution object and a new object type called the ThreadIndices. The ThreadIndices are customized for the input domain and therefore have all the information needed for a redirected lookup. It is also a thread-local object so it can cache computed indices and save on computation time.

Merge request reports