Hi guys,
----- Original Message -----
> > [...]
> > In papi_fetchCallBack() the switch statement codes the magic numbers
> > to various entries. Isn't there a more compact and regular way to
> > code that? Would it be possible to use negative number for control
> > and have the events be positive to avoid having to offset some values by 1?
>
> Looking at that portion of the code, you're absolutely correct. After
> refactoring out the PAPI_add_event code, there's no real reason to have
> the switch statement in the fetchcallback. FWIW the 'offset by 1' is an
> artifact of the enable_counters variable (used in the pmstore enabling
> counters approach). I'll reorganize the pmns and fetchcallback function
> as needed.
BTW, a good approach to use here is to have separate PMID "clusters"
for separate conceptual things. Then you can arrange the PMID "item"
field as an index (if that helps), and use "cluster" to disambiguate
from unrelated things (control metrics, preset vs native, and so on).
cheers.
--
Nathan
|