38 typedef struct _HighLevelInfo
51 long long *
values,
long long *ins,
float *rate,
int mode );
122 !=
PAPI_OK || state == NULL ) {
128 state->EventSet = -1;
204 PAPI_flips(
float *rtime,
float *ptime,
long long *flpins,
float *mflips )
210 if ( rtime == NULL || ptime == NULL ||
211 flpins == NULL || mflips == NULL ) {
263 PAPI_flops(
float *rtime,
float *ptime,
long long *flpops,
float *mflops )
269 if ( rtime == NULL || ptime == NULL || flpops == NULL || mflops == NULL )
320 PAPI_ipc(
float *rtime,
float *ptime,
long long *ins,
float *ipc )
322 long long values[2] = { 0, 0 };
326 if ( rtime == NULL || ptime == NULL || ins == NULL || ipc == NULL )
387 PAPI_epc(
int event,
float *rtime,
float *ptime,
long long *ref,
long long *core,
long long *evt,
float *epc )
389 long long values[3] = { 0, 0, 0 };
393 if ( rtime == NULL || ptime == NULL || ref == NULL ||core == NULL || evt == NULL || epc == NULL )
397 if (event != 0 )
events[0] = event;
410 long long *
values,
long long *ins,
float *rate,
int mode )
488 *rate = (float) ((
float)
values[0] / (float) (
values[1]));
602 if (
events == NULL || array_len <= 0 )
612 for (
i = 0;
i < array_len;
i++ ) {
629 state->
num_evts = ( short ) array_len;
762 if (
values == NULL || array_len <= 0 )
819 if ( array_len < state->num_evts ||
values == NULL) {
827 long long tmp_values[3];
int PAPI_stop(int EventSet, long long *values)
int _internal_hl_read_cnts(long long *values, int array_len, int flag)
long long initial_proc_time
int PAPI_add_event(int EventSet, int EventCode)
long long PAPI_get_virt_usec(void)
int PAPI_reset(int EventSet)
long long initial_real_time
int PAPI_ipc(float *rtime, float *ptime, long long *ins, float *ipc)
int PAPI_flops(float *rtime, float *ptime, long long *flpops, float *mflops)
int PAPI_accum_counters(long long *values, int array_len)
int _internal_check_state(HighLevelInfo **state)
int PAPI_add_events(int EventSet, int *Events, int number)
#define PAPI_HIGH_LEVEL_INITED
Return codes and api definitions.
#define APIDBG(format, args...)
char events[MAX_EVENTS][BUFSIZ]
int PAPI_flips(float *rtime, float *ptime, long long *flpins, float *mflips)
int PAPI_epc(int event, float *rtime, float *ptime, long long *ref, long long *core, long long *evt, float *epc)
int PAPI_get_thr_specific(int tag, void **ptr)
int PAPI_accum(int EventSet, long long *values)
void _papi_hwi_shutdown_highlevel()
int PAPI_library_init(int version)
inline_static int _papi_hwi_lock(int lck)
int PAPI_stop_counters(long long *values, int array_len)
int PAPI_get_opt(int option, PAPI_option_t *ptr)
int _internal_start_hl_counters(HighLevelInfo *state)
inline_static int _papi_hwi_unlock(int lck)
int _hl_rate_calls(float *real_time, float *proc_time, int *events, long long *values, long long *ins, float *rate, int mode)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_create_eventset(int *EventSet)
void _internal_cleanup_hl_info(HighLevelInfo *state)
int PAPI_query_event(int EventCode)
long long PAPI_get_real_usec(void)
int PAPI_set_thr_specific(int tag, void *ptr)
int PAPI_read_counters(long long *values, int array_len)
int PAPI_num_counters(void)
int PAPI_start_counters(int *events, int array_len)
int PAPI_read(int EventSet, long long *values)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
#define PAPI_HIGH_LEVEL_TLS