---
name: "TAU_MAPPING"
section: "3"
platform: "linux"
package: "tau"
version: "2.17.3.1.dfsg-4.2"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/TAU_MAPPING"
---

# TAU\_MAPPING(3)

Encapsulates a C++ statement for profiling

## NAME

TAU\_MAPPING - Encapsulates a C++ statement for profiling

## SYNOPSIS

**C/C++:**

**TAU\_MAPPING(statement** *statement***, TauGroup\_t** *key***);**

## DESCRIPTION

TAU\_MAPPING is used to encapsulate a C++ statement as a timer. A timer will be made, named by the statment, and will profile the statement. The key given can be used with [TAU\_MAPPING\_LINK(3)](/TAU_MAPPING_LINK/3.md) to retrieve the timer.

## EXAMPLE

**C/C++ :**

```
int main(int argc, char **argv) {
  Array <2> A(N, N), B(N, N), C(N,N), D(N, N);
  // Original statement:
  // A = B + C + D;
  //Instrumented statement:
  TAU_MAPPING(A = B + C + D; , TAU_USER);
  ...
}
```

## SEE ALSO

[TAU\_MAPPING\_CREATE(3)](/TAU_MAPPING_CREATE/3.md), [TAU\_MAPPING\_LINK(3)](/TAU_MAPPING_LINK/3.md)
