All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
PAPI_flops Class Reference

Simplified call to get Mflops/s (floating point operation rate), real and processor time. More...

Detailed Description

C Interface:
#include <papi.h>
int PAPI_flops( float *rtime, float *ptime, long long *flpops, float *mflops );
*rtimetotal realtime since the first call
*ptimetotal process time since the first call
*flpopstotal floating point operations since the first call
*mflopsincremental (Mega) floating point operations per seconds since the last call
Return values
PAPI_EINVALThe counters were already started by something other than PAPI_flops().
PAPI_ENOEVNTThe floating point operations event does not exist.
PAPI_ENOMEMInsufficient memory to complete the operation.

The first call to PAPI_flops() will initialize the PAPI High Level interface, set up the counters to monitor the PAPI_FP_OPS event and start the counters.

Subsequent calls will read the counters and return total real time, total process time, total floating point operations since the start of the measurement and the Mflop/s rate since latest call to PAPI_flops(). A call to PAPI_stop_counters() will stop the counters from running and then calls such as PAPI_start_counters() or other rate calls can safely be used.

PAPI_flops returns information related to theoretical floating point operations rather than simple instructions. It uses the PAPI_FP_OPS event which attempts to 'correctly' account for, e.g., FMA undercounts and FP Store overcounts, etc.

See Also

The documentation for this class was generated from the following file: