---
name: "PAPI_hl_read"
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_hl_read"
---

# PAPI\_hl\_read(3)

Read performance events inside of a region and store the difference to the corresponding beginning of the region.

## NAME

PAPI\_hl\_read - Read performance events inside of a region and store the difference to the corresponding beginning of the region.

## SYNOPSIS

## Detailed Description

**C Interface:**

\#include \<**papi.h**\> \
 int **PAPI\_hl\_read( const char\* region )**;

**Parameters**

*region* -- a unique region name corresponding to **PAPI\_hl\_region\_begin**

**Return values**

*PAPI\_OK* \
 *PAPI\_ENOTRUN* -- EventSet is currently not running or could not determined. \
 *PAPI\_ESYS* -- A system or C library call failed inside PAPI, see the errno variable. \
 *PAPI\_EMISC* -- PAPI has been deactivated due to previous errors. \
 *PAPI\_ENOMEM* -- Insufficient memory.

**PAPI\_hl\_read** reads performance events inside of a region and stores the difference to the corresponding beginning of the region.

Assumes that **PAPI\_hl\_region\_begin** was called before.

**Example:**

```
int retval;
retval = PAPI_hl_region_begin("computation");
if ( retval != PAPI_OK )
    handle_error(1);
 //Do some computation here
retval = PAPI_hl_read("computation");
if ( retval != PAPI_OK )
    handle_error(1);
 //Do some computation here
retval = PAPI_hl_region_end("computation");
if ( retval != PAPI_OK )
    handle_error(1);
```

**See also**

**PAPI\_hl\_region\_begin**

**PAPI\_hl\_region\_end**

**PAPI\_hl\_stop**

## Author

Generated automatically by Doxygen for PAPI from the source code.
