PAPI  5.0.1.0
PAPI_flops Class Reference

Simplified call to get Mflops/s (floating point instruction 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 );
Parameters:
*rtimetotal realtime since the first PAPI_flops() call
*ptimetotal process time since the first PAPI_flops() call
*flpinstotal floating point instructions since the first call
*rtimetotal realtime since the first PAPI_flops() call
*ptimetotal process time since the first PAPI_flops() call
*flpopstotal floating point instructions since the first call
Return values:
PAPI_EINVALThe counters were already started by something other than: PAPI_flips() or PAPI_flops().
PAPI_ENOEVNTThe floating point operations, floating point instructions or total cycles 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 PAPI_FP_OPS and PAPI_TOT_CYC events and start the counters. Subsequent calls will read the counters and return total real time, total process time, total floating point instructions 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() can safely be used.

The next three calls all use _hl_rate_calls() to return an instruction rate value. PAPI_flops returns information related to floating point instructions using the PAPI_FP_INS event. This is intended to measure instruction rate through the floating point pipe with no massaging. PAPI_flops return 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:
PAPI_stop_counters() PAPI_ipc() PAPI_set_opt()

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines