PAPI 7.1.0.0
Loading...
Searching...
No Matches
Lib_With_Recorder.c File Reference
Include dependency graph for Lib_With_Recorder.c:

Go to the source code of this file.

Macros

#define BRNG()
 

Functions

void recorder_init_ (void)
 
void recorder_do_work_ (void)
 
papi_handle_t papi_sde_hook_list_events (papi_sde_fptr_struct_t *fptr_struct)
 

Variables

static const char * event_names [1]
 
volatile int result
 
volatile unsigned int b
 
volatile unsigned int z1
 
volatile unsigned int z2
 
volatile unsigned int z3
 
volatile unsigned int z4
 
void * rcrd_handle
 

Macro Definition Documentation

◆ BRNG

#define BRNG ( )
Value:
{\
b = ((z1 << 6) ^ z1) >> 13;\
z1 = ((z1 & 4294967294U) << 18) ^ b;\
b = ((z2 << 2) ^ z2) >> 27;\
z2 = ((z2 & 4294967288U) << 2) ^ b;\
b = ((z3 << 13) ^ z3) >> 21;\
z3 = ((z3 & 4294967280U) << 7) ^ b;\
b = ((z4 << 3) ^ z4) >> 12;\
z4 = ((z4 & 4294967168U) << 13) ^ b;\
z1++;\
result = z1 ^ z2 ^ z3 ^ z4;\
}
volatile int result
volatile unsigned int z1
volatile unsigned int b
volatile unsigned int z2
volatile unsigned int z3
volatile unsigned int z4

Definition at line 10 of file Lib_With_Recorder.c.

Function Documentation

◆ papi_sde_hook_list_events()

papi_handle_t papi_sde_hook_list_events ( papi_sde_fptr_struct_t fptr_struct)

Definition at line 58 of file Lib_With_Recorder.c.

58 {
59 papi_handle_t tmp_handle;
60 tmp_handle = fptr_struct->init("Lib_With_Recorder");
61 fptr_struct->create_recorder(tmp_handle, event_names[0], sizeof(long long), papi_sde_compare_long_long, &rcrd_handle);
62 return tmp_handle;
63}
static const char * event_names[1]
void * rcrd_handle
int papi_sde_compare_long_long(const void *p1, const void *p2)
Definition: sde_lib.c:1052
void * papi_handle_t
Definition: sde_lib.h:100
int(* create_recorder)(papi_handle_t handle, const char *event_name, size_t typesize, int(*cmpr_func_ptr)(const void *p1, const void *p2), void **record_handle)
Definition: sde_lib.h:112
papi_handle_t(* init)(const char *lib_name)
Definition: sde_lib.h:103
Here is the call graph for this function:

◆ recorder_do_work_()

void recorder_do_work_ ( void  )

Definition at line 45 of file Lib_With_Recorder.c.

45 {
46 long long r;
47 BRNG();
48 if( result < 0 )
49 result *= -1;
50 r = result%123456;
51 papi_sde_record(rcrd_handle, sizeof(r), &r);
52 return;
53}
#define BRNG()
int papi_sde_record(void *record_handle, size_t typesize, const void *value)
Definition: sde_lib.c:909
Here is the call graph for this function:
Here is the caller graph for this function:

◆ recorder_init_()

void recorder_init_ ( void  )

Definition at line 31 of file Lib_With_Recorder.c.

31 {
32 papi_handle_t tmp_handle;
33
34 tmp_handle = papi_sde_init("Lib_With_Recorder");
36
37 z1=42;
38 z2=420;
39 z3=42000;
40 z4=424242;
41
42 return;
43}
papi_handle_t papi_sde_init(const char *name_of_library)
Definition: sde_lib.c:119
int papi_sde_create_recorder(papi_handle_t handle, const char *event_name, size_t typesize, int(*cmpr_func_ptr)(const void *p1, const void *p2), void **record_handle)
Definition: sde_lib.c:794
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ b

volatile unsigned int b

Definition at line 23 of file Lib_With_Recorder.c.

◆ event_names

const char* event_names[1]
static
Initial value:
= {
"simple_recording"
}

Definition at line 6 of file Lib_With_Recorder.c.

◆ rcrd_handle

void* rcrd_handle

Definition at line 25 of file Lib_With_Recorder.c.

◆ result

volatile int result

Definition at line 22 of file Lib_With_Recorder.c.

◆ z1

volatile unsigned int z1

Definition at line 23 of file Lib_With_Recorder.c.

◆ z2

volatile unsigned int z2

Definition at line 23 of file Lib_With_Recorder.c.

◆ z3

volatile unsigned int z3

Definition at line 23 of file Lib_With_Recorder.c.

◆ z4

volatile unsigned int z4

Definition at line 23 of file Lib_With_Recorder.c.