timing.hpp 802 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* timing.hpp -- header file for self-timing code */

#ifndef TIMING_HPP
#define TIMING_HPP 1  // Include this header file at most once

/* The timing infrastructure works with a stack-based model.

   At portions of the code to be instrumented, call timing_push("name")
   with some (short but) memortable name for the code segment; after the
   end of the section call timing_pop().  This underlying code will build
   the corresponding call-time-tree and measure (via MPI_Wtime) the time
   between the timing_push and the corresponding timing_pop.

   This model does require that timing be called in a predictable way, such
   that timing_pop is called before any possible exit from the code path.*/

void timing_push(const char * name);

void timing_pop();

void timing_stack_report();



#endif