Go to the source code of this file.
◆ loop()
Definition at line 26 of file kufrin.c.
27{
30
31 for (
i = 0;
i < n;
i++ ) {
33 }
35}
static double a[MATRIX_SIZE][MATRIX_SIZE]
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 117 of file kufrin.c.
118{
123
124
126
128 if ( argc > 1 ) {
129 int tmp = atoi( argv[1] );
132 }
133 }
134
138 }
139
143 }
144
148 }
149
152 }
153
156 }
157
158
159
161 do {
163 if ( info.
count == 1 ) {
166 } else {
167 if (!
quiet) printf(
"Skipping derived event %s\n", info.
symbol );
168 }
169 }
172
174
176 test_skip(__FILE__,__LINE__,
"No events found",0);
177 }
178
180
181 if (!
quiet) printf(
"Creating %d threads:\n", nthreads );
182
183 threads =
185 if ( threads == NULL ) {
188 }
189
190
191 for (
i = 0;
i < nthreads;
i++ ) {
195 free(threads);
197 }
198 }
199
200
201 for (
i = 0;
i < nthreads;
i++ ) {
202 retval = pthread_join( threads[
i], NULL );
205 free(threads);
207 }
208 }
209
210 if (!
quiet) printf(
"Done." );
211
213 free(threads);
215
216 pthread_exit( NULL );
217
218 return 0;
219}
Enumerate PAPI preset or native events.
Get component specific PAPI options.
Get the event's name and description info.
initialize the PAPI library.
Initialize multiplex support in the PAPI library.
Initialize thread support in the PAPI library.
#define PAPI_MAX_MPX_CTRS
unsigned long int pthread_t
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char symbol[PAPI_HUGE_STR_LEN]
◆ thread()
void * thread |
( |
void * |
arg | ) |
|
Definition at line 38 of file kufrin.c.
39{
40 ( void ) arg;
43
46 test_fail( __FILE__, __LINE__,
"PAPI_register_thread", ret );
49 test_fail( __FILE__, __LINE__,
"PAPI_create_eventset", ret );
50
52
53 if (!
TESTS_QUIET) printf(
"Event set %d created\n", eventset );
54
55
56
57
61 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component", ret );
62 }
63
67 test_skip( __FILE__, __LINE__,
"Multiplexing not supported", 1 );
68 }
71 test_fail( __FILE__, __LINE__,
"PAPI_set_multiplex", ret );
72 }
73
77 test_fail( __FILE__, __LINE__,
"PAPI_add_events", ret );
78 }
79
83 test_fail( __FILE__, __LINE__,
"PAPI_start", ret );
84 }
85
87
91 test_fail( __FILE__, __LINE__,
"PAPI_stop", ret );
92 }
93
97 test_fail( __FILE__, __LINE__,
"PAPI_cleanup_eventset", ret );
98 }
99
103 test_fail( __FILE__, __LINE__,
"PAPI_destroy_eventset", ret );
104 }
105
109 test_fail( __FILE__, __LINE__,
"PAPI_unregister_thread", ret );
110 }
111
113 return ( NULL );
114}
add multiple PAPI presets or native hardware events to an event set
Assign a component index to an existing but empty EventSet.
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Notify PAPI that a thread has 'appeared'.
Convert a standard event set to a multiplexed event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
Notify PAPI that a thread has 'disappeared'.
static long long values[NUM_EVENTS]
◆ events
◆ max_events
◆ numevents