PAPI
7.1.0.0
Loading...
Searching...
No Matches
Simple2_NoPAPI_Driver.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdint.h>
3
#include <stdlib.h>
4
#include <string.h>
5
6
void
simple_init
(
void
);
7
double
simple_compute
(
double
x
);
8
9
int
main
(
int
argc,
char
**argv){
10
int
i
;
11
int
be_verbose
= 0;
12
13
if
( (argc > 1) && !strcmp(argv[1],
"-verbose"
) )
14
be_verbose
= 1;
15
16
simple_init
();
17
18
for
(
i
=0;
i
<10;
i
++){
19
double
sum;
20
21
sum =
simple_compute
(0.87*
i
);
22
if
(
be_verbose
) printf(
"sum=%lf\n"
,sum);
23
}
24
25
// This test exists just to check that a code that links against libsde
26
// _without_ linking against libpapi will still compile and run. Therefore,
27
// if we got to this point then the test has passed.
28
fprintf(
stdout
,
"%sPASSED%s\n"
,
"\033[1;32m"
,
"\033[0m"
);
29
30
return
0;
31
}
be_verbose
int be_verbose
Definition:
Created_Counter_Driver.c:14
i
int i
Definition:
PAPI_get_virt_cyc.c:10
simple_init
void simple_init(void)
Definition:
Simple_Lib.c:25
simple_compute
double simple_compute(double x)
Definition:
Simple_Lib.c:45
stdout
FILE * stdout
main
int main()
Definition:
pernode.c:20
x
volatile double x
Definition:
timing_kernels.c:12
src
components
sde
tests
Simple2
Simple2_NoPAPI_Driver.c
Generated on Wed Dec 20 2023 18:12:51 for PAPI by
1.9.6