1 /*
2 * Copyright (c) 2010-2011, Siberian State University of Telecommunications
3 * and Information Sciences. All rights reserved.
4 * Copyright (c) 2010-2011, A.V. Rzhanov Institute of Semiconductor Physics SB RAS.
5 * All rights reserved.
6 *
7 * hpctimer.h: High-Resolution timers library.
8 * http://mpiperf.cpct.sibsutis.ru/index.php
9 *
10 * Copyright (C) 2011 Mikhail Kurnosov <mkurnosov@gmail.com>
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 * Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 *
17 * Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * Neither the name of the the copyright holders nor the
22 * names of its contributors may be used to endorse or promote products
23 * derived from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28 * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
29 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
32 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 * $COPYRIGHT$
37 *
38 * Additional copyrights may follow
39 *
40 * $HEADER$
41 */
42
43 #ifndef HPCTIMER_H
44 #define HPCTIMER_H
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 enum {
51 HPCTIMER_SUCCESS = 0,
52 HPCTIMER_FAILURE = 1
53 };
54
55 int hpctimer_initialize(const char *timername);
56 void hpctimer_finalize(void);
57 double hpctimer_wtime(void);
58 int hpctimer_sanity_check(void);
59 void hpctimer_print_timers(void);
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif /* HPCTIMER_H */