Go to the source code of this file.
◆ counter_accessor_function()
| long long counter_accessor_function |
( |
void * |
param | ) |
|
Definition at line 69 of file Simple2_Lib.c.
69 {
70 long long ll;
71 double *dbl_ptr = (double *)param;
72
73
74 double value = *dbl_ptr * 2.0;
75
76
77 (void)memcpy(&ll, &value, sizeof(double));
78
79 return ll;
80}
◆ papi_sde_hook_list_events()
Definition at line 50 of file Simple2_Lib.c.
50 {
58
63 fptr_struct->
describe_counter(
handle,
"ANY_WATERMARK_REACHED",
"Number of times a value was not between the two watermarks.");
64
66}
static const char * ev_names[4]
long long int counter_accessor_function(void *param)
static long long int total_iter_cnt
static long long int high_wtrmrk
static papi_handle_t handle
static long long int low_wtrmrk
#define PAPI_SDE_long_long
int(* describe_counter)(papi_handle_t handle, const char *event_name, const char *event_description)
papi_handle_t(* init)(const char *lib_name)
int(* register_counter)(papi_handle_t handle, const char *event_name, int mode, int type, void *counter)
int(* add_counter_to_group)(papi_handle_t handle, const char *event_name, const char *group_name, uint32_t group_flags)
int(* register_counter_cb)(papi_handle_t handle, const char *event_name, int mode, int type, papi_sde_fptr_t callback, void *param)
◆ simple_compute()
| double simple_compute |
( |
double |
x | ) |
|
Definition at line 84 of file Simple2_Lib.c.
84 {
85 double sum = 0.0;
86 int lcl_iter = 0;
87
92
93 while( 1 ){
95 lcl_iter++;
96
97
98
101 x4 = x2*x2;
102 y = 42.53*x4 -67.0*x3 +25.0*x2 +
x/2.15;
106
107
109
110
112
115 continue;
116 }
117
120 continue;
121 }
122
123
125
126
127 if( 0.61 <
y &&
y < 0.69 )
128 break;
129 }
131
132 return sum;
133}
◆ simple_init()
| void simple_init |
( |
void |
| ) |
|
Definition at line 27 of file Simple2_Lib.c.
27 {
28
29
34
35
43
44 return;
45}
papi_handle_t papi_sde_init(const char *name_of_library)
int papi_sde_register_counter(papi_handle_t handle, const char *event_name, int cntr_mode, int cntr_type, void *counter)
int papi_sde_add_counter_to_group(papi_handle_t handle, const char *event_name, const char *group_name, uint32_t group_flags)
int papi_sde_register_counter_cb(papi_handle_t handle, const char *event_name, int cntr_mode, int cntr_type, papi_sde_fptr_t callback, void *param)
◆ comp_value
◆ ev_names
Initial value:= {
"COMPUTED_VALUE",
"TOTAL_ITERATIONS",
"LOW_WATERMARK_REACHED",
"HIGH_WATERMARK_REACHED"
}
Definition at line 18 of file Simple2_Lib.c.
◆ handle
◆ high_wtrmrk
◆ low_wtrmrk
◆ total_iter_cnt