pmm
1.0.0
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
test
octave_test.c
Go to the documentation of this file.
1
#if HAVE_CONFIG_H
2
#include "
config.h
"
3
#endif
4
5
#ifdef ENABLE_OCTAVE
6
7
#include <stdio.h>
8
9
#include "
pmm_model.h
"
10
#include "
pmm_cfgparser.h
"
11
#include "
pmm_log.h
"
12
13
14
int
main
(
void
) {
15
16
struct
pmm_config
*cfg;
17
struct
pmm_benchmark
*b;
18
int
i;
19
20
int
p
[2];
21
22
cfg =
new_config
();
23
24
parse_config
(cfg);
25
26
parse_models
(cfg);
27
28
parse_history
(cfg->
loadhistory
);
29
30
31
p[0] = 124;
32
p[1] = 244;
33
34
print_config
(
PMM_LOG
, cfg);
35
36
for
(i=0;i<cfg->
used
; i++) {
37
if
(cfg->
routines
[i]->
pd_set
->
n_p
== 2) {
38
break
;
39
}
40
}
41
if
(i==cfg->
used
) {
42
printf(
"Could not find a 2-d routine.\n"
);
43
return
-1;
44
}
45
46
print_model
(
PMM_LOG
, cfg->
routines
[i]->
model
);
47
48
49
b =
lookup_model
(cfg->
routines
[i]->
model
, p);
50
51
printf(
"Interpolation of %d, %d:\n"
, p[0], p[1]);
52
53
print_benchmark
(
PMM_LOG
, b);
54
55
printf(
":-)\n"
);
56
57
free_config
(&cfg);
58
59
60
return
1;
61
}
62
63
#endif
/* ENABLE_OCTAVE */
Generated on Fri Apr 5 2013 18:25:33 for pmm by
1.8.1.2