kokkos-tools icon indicating copy to clipboard operation
kokkos-tools copied to clipboard

initialisation of the event set

Open maartenarnst opened this issue 1 year ago • 0 comments

The tools currently initialise the event set by using

Kokkos::Tools::Experimental::EventSet my_event_set;
  memset(&my_event_set, 0,
         sizeof(my_event_set));  // zero any pointers not set here

As @dalg24 had pointed out in

  • https://github.com/kokkos/kokkos-tools/pull/219#discussion_r1396356103_

it may be better to initialise the event set by another form of initialisation.

It seems the event set is an aggregate. If we want to initialise it like

EventSet my_event_set{};

two questions are:

  • should we assign default values (e.g. NULL or nullptr) to the function pointers in the struct?
  • should something be done for the char*?

maartenarnst avatar Nov 19 '23 09:11 maartenarnst