---
name: "PAPI_flops_rate"
section: "3"
platform: "linux"
package: "libpapi-dev"
version: "7.1.0-5+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PAPI_flops_rate"
---

# PAPI\_flops\_rate(3)

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

## NAME

PAPI\_flops\_rate - 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\_rate** ( int event, float \*rtime, float \*ptime, long long \*flpops, float \*mflops );

**Parameters**

*event* one of the three presets PAPI\_FP\_OPS, PAPI\_SP\_OPS or PAPI\_DP\_OPS \
 *\*rtime* realtime since the latest call \
 *\*ptime* process time since the latest call \
 *\*flpops* floating point operations since the latest call \
 *\*mflops* incremental (Mega) floating point operations per seconds since the latest call

**Return values**

*PAPI\_EINVAL* The counters were already started by something other than **PAPI\_flops\_rate()**. \
 *PAPI\_ENOEVNT* The floating point operations event does not exist. \
 *PAPI\_ENOMEM* Insufficient memory to complete the operation.

The first call to **PAPI\_flops\_rate()** will initialize the PAPI interface, set up the counters to monitor the floating point operations event and start the counters.

Subsequent calls will read the counters and return real time, process time, floating point operations and the Mflop/s rate since the latest call to **PAPI\_flops\_rate()**.

**PAPI\_flops\_rate()** returns information related to theoretical floating point operations rather than simple instructions. It uses the floating point operations event which attempts to 'correctly' account for, e.g., FMA undercounts and FP Store overcounts. Note that **PAPI\_flops\_rate()** is thread-safe and can therefore be called by multiple threads.

**See also**

**PAPI\_flips\_rate()**

**PAPI\_ipc()**

**PAPI\_epc()**

**PAPI\_rate\_stop()**

## Author

Generated automatically by Doxygen for PAPI from the source code.
