---
name: "PAPI_ipc"
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_ipc"
---

# PAPI\_ipc(3)

Simplified call to get instructions per cycle, real and processor time.

## NAME

PAPI\_ipc - Simplified call to get instructions per cycle, real and processor time.

## SYNOPSIS

## Detailed Description

**C Interface:**

\#include \<**papi.h**\> \
 int **PAPI\_ipc( float \*rtime, float \*ptime, long long \*ins, float \*ipc )**;

**Parameters**

*\*rtime* realtime since the latest call \
 *\*ptime* process time since the latest call \
 *\*ins* instructions since the latest call \
 *\*ipc* incremental instructions per cycle since the latest call

**Return values**

*PAPI\_EINVAL* The counters were already started by something other than **PAPI\_ipc()**. \
 *PAPI\_ENOEVNT* The events PAPI\_TOT\_INS and PAPI\_TOT\_CYC are not supported. \
 *PAPI\_ENOMEM* Insufficient memory to complete the operation.

The first call to **PAPI\_ipc()** will initialize the PAPI interface, set up the counters to monitor PAPI\_TOT\_INS and PAPI\_TOT\_CYC events and start the counters.

Subsequent calls will read the counters and return real time, process time, instructions and the IPC rate since the latest call to **PAPI\_ipc()**.

**PAPI\_ipc()** should return a ratio greater than 1.0, indicating instruction level parallelism within the chip. The larger this ratio the more effeciently the program is running. Note that **PAPI\_ipc()** is thread-safe and can therefore be called by multiple threads.

**See also**

**PAPI\_flips\_rate()**

**PAPI\_flops\_rate()**

**PAPI\_epc()**

**PAPI\_rate\_stop()**

## Author

Generated automatically by Doxygen for PAPI from the source code.
