Go to the source code of this file.
◆ libCSet_count_set_elements()
| int libCSet_count_set_elements |
( |
cset_list_object_t * |
list_head | ) |
|
Definition at line 114 of file CountingSet_Lib.c.
114 {
115 cset_list_object_t *list_runner;
116 int element_count = 0;
117
118 for(list_runner = list_head; NULL != list_runner; list_runner=list_runner->next){
119 ++element_count;
120 }
121
122 return element_count;
123}
◆ libCSet_do_memory_allocations()
| void libCSet_do_memory_allocations |
( |
void |
| ) |
|
Definition at line 44 of file CountingSet_Lib.c.
44 {
46 void *mem_set;
47 void *ptrs[128];
48
51
54
56 size_t len = (17+
i)*73;
57 ptrs[
i] = malloc(len);
58
59 alloc_elem.
ptr = ptrs[
i];
61 alloc_elem.
size = len;
63 }
64
68 }
69
71 size_t len = (19+
i)*73;
72 ptrs[
i] = malloc(len);
73
74 alloc_elem.
ptr = ptrs[
i];
76 alloc_elem.
size = len;
78 }
79
83 }
84
85 }
86
87 return;
88}
static long iter[MAX_THREADS]
papi_handle_t papi_sde_init(const char *name_of_library)
int papi_sde_counting_set_remove(void *cset_handle, size_t hashable_size, const void *element, uint32_t type_id)
int papi_sde_counting_set_insert(void *cset_handle, size_t element_size, size_t hashable_size, const void *element, uint32_t type_id)
int papi_sde_create_counting_set(papi_handle_t handle, const char *cset_name, void **cset_handle)
◆ libCSet_do_simple_work()
| void libCSet_do_simple_work |
( |
void |
| ) |
|
Definition at line 21 of file CountingSet_Lib.c.
21 {
23 void *test_set;
25
28
29 for(
i=0;
i<22390;
i++){
32 element.
x = (float)j*1.037/((
float)j+32.1);
33 element.
y = (double)(element.
x)+145.67/((double)j+0.01);
35 }
36
37 return;
38}
◆ libCSet_dump_set()
| void libCSet_dump_set |
( |
cset_list_object_t * |
list_head | ) |
|
Definition at line 90 of file CountingSet_Lib.c.
90 {
91 cset_list_object_t *list_runner;
92
93 for(list_runner = list_head; NULL != list_runner; list_runner=list_runner->next){
94
95 switch(list_runner->type_id){
96 case 0:
97 {
99 printf(
"count= %d typesize= %lu {id= %d, x= %f, y= %lf}\n", list_runner->count, list_runner->type_size, ptr->
id, ptr->
x, ptr->
y);
100 break;
101 }
102 case 1:
103 {
105 printf(
"count= %d typesize= %lu { ptr= %p, line= %d, size= %lu }\n", list_runner->count, list_runner->type_size, ptr->
ptr, ptr->
line_of_code, ptr->
size);
106 break;
107 }
108 }
109 }
110
111 return;
112}
◆ libCSet_finalize()
| int libCSet_finalize |
( |
void |
| ) |
|
Definition at line 40 of file CountingSet_Lib.c.
40 {
42}
int papi_sde_shutdown(papi_handle_t handle)
◆ papi_sde_hook_list_events()
Definition at line 129 of file CountingSet_Lib.c.
129 {
131 tmp_handle = fptr_struct->
init(
"CSET_LIB");
134 return tmp_handle;
135}
papi_handle_t(* init)(const char *lib_name)
int(* create_counting_set)(papi_handle_t handle, const char *cset_name, void **cset_handle)
◆ handle