---
name: "PAPI_flops"
section: "3"
platform: "linux"
package: "libpapi-dev"
version: "5.7.0+dfsg-2"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/PAPI_flops"
---

# PAPI\_flops(3)

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

## NAME

PAPI\_flops -

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

## SYNOPSIS

## Detailed Description

**C Interface:**

\#include \<**papi.h**\> \
 int **PAPI\_flops( float \*rtime, float \*ptime, long long \*flpops, float \*mflops )**;

**Parameters:**

*\*rtime* total realtime since the first call \
 *\*ptime* total process time since the first call \
 *\*flpops* total floating point operations since the first call \
 *\*mflops* incremental (Mega) floating point operations per seconds since the last call

**Return values:**

*PAPI\_EINVAL* The counters were already started by something other than **PAPI\_flops()**. \
 *PAPI\_ENOEVNT* The floating point operations event does not exist. \
 *PAPI\_ENOMEM* Insufficient 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:**

**PAPI\_flips()**

**PAPI\_ipc()**

**PAPI\_epc()**

**PAPI\_stop\_counters()**

## Author

Generated automatically by Doxygen for PAPI from the source code.
