#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include "litl_timer.h"
Go to the source code of this file.
#define ERROR_TIMER_NOT_AVAILABLE |
( |
| ) |
|
Value:do { \
fprintf(stderr, "Trying to use timer function %s, but it is not available on this platform\n",__FUNCTION__); \
abort(); \
} while(0)
Definition at line 15 of file litl_timer.c.
#define RUN_BENCHMARK |
( |
|
_func_ | ) |
|
Value:do { \
cur_score = __litl_time_benchmark_generic(_func_); \
if(cur_score > best_score) { \
best_score = cur_score;
\
} \
}while(0)
int litl_set_timing_method(litl_timing_method_t callback)
Selects the timing function to use.
Value:do { \
uint32_t __a,__d; \
asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \
} while(0)
uint64_t litl_time_t
A data type for storing time stamps.