1 | /* |
---|
2 | This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2008. |
---|
3 | Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch |
---|
4 | */ |
---|
5 | |
---|
6 | /** |
---|
7 | * @file OTF_inttypes.h |
---|
8 | * |
---|
9 | * @brief Deals with all data type related issues. |
---|
10 | * |
---|
11 | * \ingroup misc |
---|
12 | */ |
---|
13 | |
---|
14 | |
---|
15 | #ifndef OTF_INTTYPES_H |
---|
16 | #define OTF_INTTYPES_H |
---|
17 | |
---|
18 | #if defined(_WIN32) /* windows */ |
---|
19 | # include "OTF_inttypes_win.h" |
---|
20 | #else /* unix */ |
---|
21 | # include "OTF_inttypes_unix.h" |
---|
22 | #endif |
---|
23 | |
---|
24 | #ifdef __cplusplus |
---|
25 | extern "C" { |
---|
26 | #endif /* __cplusplus */ |
---|
27 | |
---|
28 | /** Converts unsigned integers of 8, 16, 32 or 64 bit length into OTF counter values. */ |
---|
29 | uint64_t OTF_Unsigned2Counter( uint64_t value ); |
---|
30 | /** Converts OTF counter values to unsigned integers of 8, 16, 32 or 64 bit length. */ |
---|
31 | uint64_t OTF_Counter2Unsigned( uint64_t value ); |
---|
32 | |
---|
33 | |
---|
34 | /** Converts signed integers of 8, 16, 32 or 64 bit length to OTF counter values. */ |
---|
35 | uint64_t OTF_Signed2Counter( int64_t value ); |
---|
36 | /** Converts OTF counter values to signed integers of 8, 16, 32 or 64 bit length. */ |
---|
37 | int64_t OTF_Counter2Signed( uint64_t value ); |
---|
38 | |
---|
39 | |
---|
40 | /** Converts single precision floating point variables to OTF counter values. */ |
---|
41 | uint64_t OTF_Float2Counter( float value ); |
---|
42 | /** Converts OTF counter values to single precision floating point values. */ |
---|
43 | float OTF_Counter2Float( uint64_t value ); |
---|
44 | |
---|
45 | |
---|
46 | /** Converts double precision floating point values to OTF counter values. */ |
---|
47 | uint64_t OTF_Double2Counter( double value ); |
---|
48 | /** Converts OTF counter values to double precision floating point values. */ |
---|
49 | double OTF_Counter2Double( uint64_t value ); |
---|
50 | |
---|
51 | #ifdef __cplusplus |
---|
52 | } |
---|
53 | #endif /* __cplusplus */ |
---|
54 | |
---|
55 | #endif /* OTF_INTTYPES_H */ |
---|