Skip to content

Add dispatcher type when logging worklet invocation

Kenneth Moreland requested to merge kmorel/vtk-m:device-type-in-perf-log into master

When you invoke a worklet, a scoped performance log is automatically generated. The previous version gave the name of the worklet, which is technically everything you need to know. However, it is also convenient to know what type of worklet it is (e.g. a field map worklet or a topology map worklet). This can be determined by looking at the definition of the worklet in the source code, but that is not practical if, for example, you want to perform automated analysis.

This change prints out the type of the dispatcher instead of the worklet. The full type of the dispatcher includes the worklet as a template parameter, so you get both the dispatcher/worklet type and the worklet itself. So previously you would get log lines like

Invoking Worklet: 'vtkm::worklet::vtkm::worklet::ExternalFaces::NumFacesPerCell'

They now look like this:

Invoking Worklet: 'vtkm::worklet::DispatcherMapTopology<vtkm::worklet::ExternalFaces::NumFacesPerCell>'

Merge request reports