Name

TAU_CREATE_DYNAMIC_AUTO — Creates a dynamic timer for C/C++

Synopsis

TAU_CREATE_DYNAMIC_AUTO( timer,  
  function_name,  
  type,  
  group);  
Timer   timer;
char* or string&   function_name;
char* or string&   type;
taugroup_t   group;

description

TAU_CREATE_DYNAMIC_AUTO creates a dynamic timer automatically incrementing the name each time the timer is executed.

example

int tau_ret_val;
TAU_PROFILE_CREATE_DYNAMIC_AUTO(tautimer, "int foo1(int) C [{foo.c} {22,1}-{29,1}]", " ",TAU_USER);
TAU_PROFILE_START(tautimer);
{
printf("inside foo1: calling bar: x = %d\n", x);
printf("before calling bar in foo1\n");
bar(x-1); /* 26 */
printf("after calling bar in foo1\n");
{ tau_ret_val =  x; TAU_PROFILE_STOP(tautimer); return (tau_ret_val); }