/[escript]/trunk/paso/src/performance.h
ViewVC logotype

Annotation of /trunk/paso/src/performance.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1387 - (hide annotations)
Fri Jan 11 07:45:26 2008 UTC (11 years, 10 months ago) by trankine
Original Path: temp/paso/src/performance.h
File MIME type: text/plain
File size: 2493 byte(s)
Restore the trunk that existed before the windows changes were committed to the (now moved to branches) old trunk.
1 ksteube 1312
2 gross 494 /* $Id$ */
3    
4 ksteube 1312 /*******************************************************
5     *
6     * Copyright 2003-2007 by ACceSS MNRF
7     * Copyright 2007 by University of Queensland
8     *
9     * http://esscc.uq.edu.au
10     * Primary Business: Queensland, Australia
11     * Licensed under the Open Software License version 3.0
12     * http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15 dhawcroft 631
16 gross 494 /**************************************************************/
17    
18 gross 495 /* Paso: perfomance monitor interface using papi */
19 gross 494
20     /**************************************************************/
21    
22 gross 495 /* Copyrights by ACcESS Australia 2006 */
23 gross 494 /* Author: gross@access.edu.au */
24    
25     /**************************************************************/
26    
27     #ifndef INC_PASO_PERFORMANCE
28     #define INC_PASO_PERFORMANCE
29    
30 gross 495 #define PERFORMANCE_UNMONITORED_EVENT -1
31     #define PERFORMANCE_NUM_EVENTS 10 /* maximum number of events handeled by PAPI */
32 gross 494
33 gross 495 #define PERFORMANCE_ALL 0
34     #define PERFORMANCE_SOLVER 1
35     #define PERFORMANCE_PRECONDITIONER_INIT 2
36     #define PERFORMANCE_PRECONDITIONER 3
37     #define PERFORMANCE_MVM 4
38     #define PERFORMANCE_ASSEMBLAGE 5
39     #define PERFORMANCE_UNKNOWN 6 /* more can be added here */
40     #define PERFORMANCE_NUM_MONITORS PERFORMANCE_UNKNOWN+1
41 gross 494
42 gross 495 #define PERFORMANCE_UNUSED -1
43     #define PERFORMANCE_CLOSED 0
44     #define PERFORMANCE_OPENED 1
45 gross 494
46 gross 495 #ifdef PAPI
47     #include <papi.h>
48 gross 494 struct Paso_Performance {
49 gross 495 int event_set; /* papi event sets for the monitors */
50     int num_events; /* number of events tracked by the monitors */
51     int events[PERFORMANCE_NUM_EVENTS]; /* the event tracked by the monitors */
52     long_long values[PERFORMANCE_NUM_MONITORS][PERFORMANCE_NUM_EVENTS]; /* counter accummulator */
53     long_long cycles[PERFORMANCE_NUM_MONITORS]; /* cycle accumulator */
54     int set[PERFORMANCE_NUM_MONITORS];
55 gross 584 };
56 gross 495 #else
57     struct Paso_Performance {
58     int none;
59 gross 494 };
60     #endif
61 gross 495 typedef struct Paso_Performance Paso_Performance;
62 gross 494
63    
64 gross 584 void Performance_open(Paso_Performance* pp,int verbose);
65 gross 495 int Performance_getEventIndex(Paso_Performance* pp, int event_id);
66 gross 584 void Performance_close(Paso_Performance* pp,int verbose);
67 gross 495 void Performance_startMonitor(Paso_Performance* pp,int monitor);
68     void Performance_stopMonitor(Paso_Performance* pp,int monitor);
69 gross 494
70 gross 495 #endif
71 gross 494
72 gross 495 /*
73     * $Log$
74     */

  ViewVC Help
Powered by ViewVC 1.1.26