| Example | |
|---|---|
| Author(s) | PAPI team |
| Version | PAPI current |
| Last modified | 2011/05/23 |
| Author support | Yes |
| Component overview | Example component code with 3 counters |
| Source Code |
http://icl.cs.utk.edu/viewcvs/viewcvs.cgi/PAPI/papi/src/components/example/ |
Contents |
This component has three counters, one that always returns 0, one that returns a constant, one that returns an auto-incrementing value.
While it works as is, there are still some improvements that can be made: * PAPI_write() should be implemented * auto-increment counter should only increment when it itself is being read, and not increment whenever any of the example counters are read. Both of the above will make the component more complicated, but might help writers of new components.
Use the "Download tarball" link on the provided page to download a tarball of the source code folder to your computer. Untar the folder and place it in the components directory of your PAPI source tree. Configure using "--with-component=example". Rebuild PAPI.
Use as directed.
Anywhere you want to be.