blob: ce35360a9500fbae5ae2a0d399ea6c19d8dd25d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#include <stdio.h>
#include "f.h"
#include "../cycles.h"
#if 0
int main(void){
cycle_count_config();
int i;
int S = 0;
TIMEINIT
for (i = 0; i < 1000; i++){
S += f(i, i*2);
}
TIMESTOP(0)
printf("Final value: %d\n", S);
TIMESTOP(1)
TIMEPRINT(1)
return 0;
}
#endif
int main(void){
cycle_count_config();
TIMEINIT
int a = 42;
int b = 21;
int c = 42+b;
TIMESTOP(0)
int d = a + b;
int e = a + b + c + d;
TIMESTOP(1)
TIMEPRINT(1)
return e;
}
|