ROSS
core
clock
amd64.h
Go to the documentation of this file.
1
#ifndef INC_clock_amd64
2
#define INC_clock_amd64
3
4
#include <stdint.h>
5
6
typedef
uint64_t
tw_clock
;
7
8
static
inline
tw_clock
tw_clock_read
(
void
)
9
{
10
tw_clock
result=0;
11
#ifdef ROSS_timing
12
unsigned
a, d;
13
14
do
{
15
__asm__ __volatile__(
"rdtsc"
:
"=a"
(a),
"=d"
(d));
16
result = ((uint64_t)a) | (((uint64_t)d) << 32);
17
}
while
(__builtin_expect ((
int
) result == -1, 0));
18
#endif
19
return
result;
20
}
21
22
#endif
tw_clock
uint64_t tw_clock
Definition
aarch64.h:6
tw_clock_read
static tw_clock tw_clock_read(void)
Definition
amd64.h:8
Generated by
1.14.0