Add dispatcher type when logging worklet invocation

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>'
```
This commit is contained in:
Kenneth Moreland 2020-10-08 16:09:53 -06:00
parent ec6b2bc7fb
commit 7933c70ca5

@ -599,7 +599,7 @@ public:
{
VTKM_LOG_SCOPE(vtkm::cont::LogLevel::Perf,
"Invoking Worklet: '%s'",
vtkm::cont::TypeToString<WorkletType>().c_str());
vtkm::cont::TypeToString<DerivedClass>().c_str());
this->StartInvoke(std::forward<Args>(args)...);
}