---
name: "TAU_MAPPING_PROFILE_TIMER"
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_PROFILE_TIMER"
---

# TAU\_MAPPING\_PROFILE\_TIMER(3)

Declares a mapping timer

## NAME

TAU\_MAPPING\_PROFILE\_TIMER - Declares a mapping timer

## SYNOPSIS

**C/C++:**

**TAU\_MAPPING\_PROFILE\_TIMER(Profiler** *timer***, FunctionInfo \****FuncIdVar***);**

## DESCRIPTION

TAU\_MAPPING\_PROFILE\_TIMER enables timing of individual statements, instead of complete blocks. It will attribute the time to a higher-level statement. The second argument is the identifier of the statement that is obtained after TAU\_MAPPING\_OBJECT and TAU\_MAPPING\_LINK have executed. The timer argument in this macro is any variable that is used subsequently to start and stop the timer.

## EXAMPLE

**C/C++ :**

```
template<class LHS,class Op,class RHS,class EvalTag>
void
ExpressionKernel<LHS,Op,RHS,EvalTag>::run() {
  TAU_MAPPING_PROFILE_TIMER(timer, TauMapFI);
  printf("ExpressionKernel::run() this = 4854\n", this);
  // Just evaluate the expression.
  TAU_MAPPING_PROFILE_START(timer);
  KernelEvaluator<EvalTag>().evaluate(lhs_m, op_m, rhs_m);
  TAU_MAPPING_PROFILE_STOP();
  // we could release the locks here instead of in the dtor.
}
```

## SEE ALSO

[TAU\_MAPPING\_LINK(3)](/TAU_MAPPING_LINK/3.md), [TAU\_MAPPING\_OBJECT(3)](/TAU_MAPPING_OBJECT/3.md), [TAU\_MAPPING\_PROFILE\_START(3)](/TAU_MAPPING_PROFILE_START/3.md), [TAU\_MAPPING\_PROFILE\_STOP(3)](/TAU_MAPPING_PROFILE_STOP/3.md)
