PAPI  5.3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
papi_fwrappers.c File Reference
Include dependency graph for papi_fwrappers.c:

Go to the source code of this file.

Macros

#define PAPI_FCALL(function, caps, args)   void function args
 

Functions

 PAPI_FCALL (papif_accum, PAPIF_ACCUM,(int *EventSet, long long *values, int *check))
 
 PAPI_FCALL (papif_add_event, PAPIF_ADD_EVENT,(int *EventSet, int *Event, int *check))
 
 PAPI_FCALL (papif_add_named_event, PAPIF_ADD_NAMED_EVENT,(int *EventSet, char *EventName, int *check))
 
 PAPI_FCALL (papif_add_events, PAPIF_ADD_EVENTS,(int *EventSet, int *Events, int *number, int *check))
 
 PAPI_FCALL (papif_cleanup_eventset, PAPIF_CLEANUP_EVENTSET,(int *EventSet, int *check))
 
 PAPI_FCALL (papif_create_eventset, PAPIF_CREATE_EVENTSET,(int *EventSet, int *check))
 
 PAPI_FCALL (papif_assign_eventset_component, PAPIF_ASSIGN_EVENTSET_COMPONENT,(int *EventSet, int *cidx, int *check))
 
 PAPI_FCALL (papif_destroy_eventset, PAPIF_DESTROY_EVENTSET,(int *EventSet, int *check))
 
 PAPI_FCALL (papif_get_dmem_info, PAPIF_GET_DMEM_INFO,(long long *dest, int *check))
 
 PAPI_FCALL (papif_get_exe_info, PAPIF_GET_EXE_INFO,(char *fullname, char *name, long long *text_start, long long *text_end, long long *data_start, long long *data_end, long long *bss_start, long long *bss_end, int *check))
 
 PAPI_FCALL (papif_get_hardware_info, PAPIF_GET_HARDWARE_INFO,(int *ncpu, int *nnodes, int *totalcpus, int *vendor, char *vendor_string, int *model, char *model_string, float *revision, float *mhz))
 
 PAPI_FCALL (papif_num_cmp_hwctrs, PAPIF_num_cmp_hwctrs,(int *cidx, int *num))
 
 PAPI_FCALL (papif_thread_init, PAPIF_THREAD_INIT,(unsigned long int(*handle)(void), int *check))
 
 PAPI_FCALL (papif_list_events, PAPIF_LIST_EVENTS,(int *EventSet, int *Events, int *number, int *check))
 
 PAPI_FCALL (papif_get_multiplex, PAPIF_GET_MULTIPLEX,(int *EventSet, int *check))
 
 PAPI_FCALL (papif_set_multiplex, PAPIF_SET_MULTIPLEX,(int *EventSet, int *check))
 
 PAPI_FCALL (papif_perror, PAPIF_PERROR,(char *message))
 
 PAPI_FCALL (papif_query_event, PAPIF_QUERY_EVENT,(int *EventCode, int *check))
 
 PAPI_FCALL (papif_query_named_event, PAPIF_QUERY_NAMED_EVENT,(char *EventName, int *check))
 
 PAPI_FCALL (papif_get_event_info, PAPIF_GET_EVENT_INFO,(int *EventCode, char *symbol, char *long_descr, char *short_descr, int *count, char *event_note, int *flags, int *check))
 
 PAPI_FCALL (papif_event_code_to_name, PAPIF_EVENT_CODE_TO_NAME,(int *EventCode, char *out, int *check))
 
 PAPI_FCALL (papif_event_name_to_code, PAPIF_EVENT_NAME_TO_CODE,(char *in, int *out, int *check))
 
 PAPI_FCALL (papif_enum_event, PAPIF_ENUM_EVENT,(int *EventCode, int *modifier, int *check))
 
 PAPI_FCALL (papif_read, PAPIF_READ,(int *EventSet, long long *values, int *check))
 
 PAPI_FCALL (papif_read_ts, PAPIF_READ_TS,(int *EventSet, long long *values, long long *cycles, int *check))
 
 PAPI_FCALL (papif_remove_event, PAPIF_REMOVE_EVENT,(int *EventSet, int *Event, int *check))
 
 PAPI_FCALL (papif_remove_named_event, PAPIF_REMOVE_NAMED_EVENT,(int *EventSet, char *EventName, int *check))
 
 PAPI_FCALL (papif_remove_events, PAPIF_REMOVE_EVENTS,(int *EventSet, int *Events, int *number, int *check))
 
 PAPI_FCALL (papif_set_cmp_domain, PAPIF_SET_CMP_DOMAIN,(int *domain, int *cidx, int *check))
 
 PAPI_FCALL (papif_set_granularity, PAPIF_SET_GRANULARITY,(int *granularity, int *check))
 
 PAPI_FCALL (papif_set_cmp_granularity, PAPIF_SET_CMP_GRANULARITY,(int *granularity, int *cidx, int *check))
 
 PAPI_FCALL (papif_state, PAPIF_STATE,(int *EventSet, int *status, int *check))
 
 PAPI_FCALL (papif_stop, PAPIF_STOP,(int *EventSet, long long *values, int *check))
 
 PAPI_FCALL (papif_write, PAPIF_WRITE,(int *EventSet, long long *values, int *check))
 
 PAPI_FCALL (papif_lock, PAPIF_LOCK,(int *lock, int *check))
 
 PAPI_FCALL (papif_unlock, PAPIF_unlock,(int *lock, int *check))
 
 PAPI_FCALL (papif_start_counters, PAPIF_START_COUNTERS,(int *events, int *array_len, int *check))
 
 PAPI_FCALL (papif_read_counters, PAPIF_READ_COUNTERS,(long long *values, int *array_len, int *check))
 
 PAPI_FCALL (papif_stop_counters, PAPIF_STOP_COUNTERS,(long long *values, int *array_len, int *check))
 
 PAPI_FCALL (papif_accum_counters, PAPIF_ACCUM_COUNTERS,(long long *values, int *array_len, int *check))
 
 PAPI_FCALL (papif_ipc, PAPIF_IPC,(float *rtime, float *ptime, long long *ins, float *ipc, int *check))
 
 PAPI_FCALL (papif_epc, PAPIF_EPC,(int event, float *rtime, float *ptime, long long *ref, long long *core, long long *evt, float *epc, int *check))
 
 PAPI_FCALL (papif_flips, PAPIF_FLIPS,(float *real_time, float *proc_time, long long *flpins, float *mflips, int *check))
 
 PAPI_FCALL (papif_flops, PAPIF_FLOPS,(float *real_time, float *proc_time, long long *flpops, float *mflops, int *check))
 
 PAPI_FCALL (papif_get_preload, PAPIF_GET_PRELOAD,(char *lib_preload_env, int *check))
 
 PAPI_FCALL (papif_get_granularity, PAPIF_GET_GRANULARITY,(int *eventset, int *granularity, int *mode, int *check))
 
 PAPI_FCALL (papif_get_domain, PAPIF_GET_DOMAIN,(int *eventset, int *domain, int *mode, int *check))
 
 PAPI_FCALL (papif_set_event_domain, PAPIF_SET_EVENT_DOMAIN,(int *es, int *domain, int *check))
 

Variables

i inherit inherit = *inherit
 
check = PAPI_set_opt( PAPI_INHERIT, &i )
 

Macro Definition Documentation

#define PAPI_FCALL (   function,
  caps,
  args 
)    void function args

Definition at line 36 of file papi_fwrappers.c.

Function Documentation

PAPI_FCALL ( papif_accum  ,
PAPIF_ACCUM  ,
(int *EventSet, long long *values, int *check  
)

Definition at line 77 of file papi_fwrappers.c.

79 {
81 }
* check
int PAPI_accum(int EventSet, long long *values)
Definition: papi.c:2653
int EventSet
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_add_event  ,
PAPIF_ADD_EVENT  ,
(int *EventSet, int *Event, int *check  
)

Definition at line 93 of file papi_fwrappers.c.

95 {
97 }
int PAPI_add_event(int EventSet, int EventCode)
Definition: papi.c:1597
* check
int EventSet
int Event[MAX_EVENTS]

Here is the call graph for this function:

PAPI_FCALL ( papif_add_named_event  ,
PAPIF_ADD_NAMED_EVENT  ,
(int *EventSet, char *EventName, int *check  
)

Definition at line 118 of file papi_fwrappers.c.

120 {
121  *check = PAPI_add_named_event( *EventSet, EventName );
122 }
int PAPI_add_named_event(int EventSet, char *EventName)
Definition: papi.c:1809
* check
int EventSet

Here is the call graph for this function:

PAPI_FCALL ( papif_add_events  ,
PAPIF_ADD_EVENTS  ,
(int *EventSet, int *Events, int *number, int *check  
)

Definition at line 135 of file papi_fwrappers.c.

137 {
138  *check = PAPI_add_events( *EventSet, Events, *number );
139 }
static int Events[NUM_EVENTS]
Definition: init_fini.c:8
int PAPI_add_events(int EventSet, int *Events, int number)
Definition: papi.c:5707
* check
int EventSet

Here is the call graph for this function:

PAPI_FCALL ( papif_cleanup_eventset  ,
PAPIF_CLEANUP_EVENTSET  ,
(int *EventSet, int *check  
)

Definition at line 151 of file papi_fwrappers.c.

153 {
155 }
* check
int PAPI_cleanup_eventset(int EventSet)
Definition: papi.c:2795
int EventSet

Here is the call graph for this function:

PAPI_FCALL ( papif_create_eventset  ,
PAPIF_CREATE_EVENTSET  ,
(int *EventSet, int *check  
)

Definition at line 167 of file papi_fwrappers.c.

169 {
171 }
* check
int PAPI_create_eventset(int *EventSet)
Definition: papi.c:1399
int EventSet

Here is the call graph for this function:

PAPI_FCALL ( papif_assign_eventset_component  ,
PAPIF_ASSIGN_EVENTSET_COMPONENT  ,
(int *EventSet, int *cidx, int *check  
)

Definition at line 183 of file papi_fwrappers.c.

185 {
187 }
* check
static int cidx
Definition: event_info.c:40
int PAPI_assign_eventset_component(int EventSet, int cidx)
Definition: papi.c:1460
int EventSet

Here is the call graph for this function:

PAPI_FCALL ( papif_destroy_eventset  ,
PAPIF_DESTROY_EVENTSET  ,
(int *EventSet, int *check  
)

Definition at line 199 of file papi_fwrappers.c.

201 {
203 }
* check
int EventSet
int PAPI_destroy_eventset(int *EventSet)
Definition: papi.c:1937

Here is the call graph for this function:

PAPI_FCALL ( papif_get_dmem_info  ,
PAPIF_GET_DMEM_INFO  ,
(long long *dest, int *check  
)

Definition at line 216 of file papi_fwrappers.c.

218 {
219  *check = PAPI_get_dmem_info( ( PAPI_dmem_info_t * ) dest );
220 }
* check
A pointer to the following is passed to PAPI_get_dmem_info()
Definition: papi.h:866
int PAPI_get_dmem_info(PAPI_dmem_info_t *dest)
Definition: papi.c:5924

Here is the call graph for this function:

PAPI_FCALL ( papif_get_exe_info  ,
PAPIF_GET_EXE_INFO  ,
(char *fullname, char *name, long long *text_start,long long *text_end, long long *data_start, long long *data_end,long long *bss_start, long long *bss_end, int *check  
)

Definition at line 242 of file papi_fwrappers.c.

247 {
248  PAPI_option_t e;
249 /* WARNING: The casts from caddr_t to long below WILL BREAK on systems with
250  64-bit addresses. I did it here because I was lazy. And because I wanted
251  to get rid of those pesky gcc warnings. If you find a 64-bit system,
252  conditionalize the cast with (yet another) #ifdef...
253 */
254  if ( ( *check = PAPI_get_opt( PAPI_EXEINFO, &e ) ) == PAPI_OK ) {
255 #if defined(_FORTRAN_STRLEN_AT_END)
256  int i;
257  strncpy( fullname, e.exe_info->fullname, ( size_t ) fullname_len );
258  for ( i = ( int ) strlen( e.exe_info->fullname ); i < fullname_len;
259  fullname[i++] = ' ' );
260  strncpy( name, e.exe_info->address_info.name, ( size_t ) name_len );
261  for ( i = ( int ) strlen( e.exe_info->address_info.name ); i < name_len;
262  name[i++] = ' ' );
263 #else
264  strncpy( fullname, e.exe_info->fullname, PAPI_MAX_STR_LEN );
266 #endif
267  *text_start = ( long ) e.exe_info->address_info.text_start;
268  *text_end = ( long ) e.exe_info->address_info.text_end;
269  *data_start = ( long ) e.exe_info->address_info.data_start;
270  *data_end = ( long ) e.exe_info->address_info.data_end;
271  *bss_start = ( long ) e.exe_info->address_info.bss_start;
272  *bss_end = ( long ) e.exe_info->address_info.bss_end;
273  }
274 }
char name[PAPI_HUGE_STR_LEN]
Definition: papi.h:691
caddr_t text_end
Definition: papi.h:693
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
return PAPI_OK
Definition: linux-nvml.c:458
caddr_t bss_start
Definition: papi.h:696
A pointer to the following is passed to PAPI_set/get_opt()
Definition: papi.h:843
* check
int i
Definition: fileop.c:140
int PAPI_get_opt(int option, PAPI_option_t *ptr)
Definition: papi.c:4030
caddr_t text_start
Definition: papi.h:692
PAPI_address_map_t address_info
Definition: papi.h:704
long long
Definition: iozone.c:19827
#define PAPI_EXEINFO
Definition: fpapi.h:60
caddr_t data_start
Definition: papi.h:694
PAPI_exe_info_t * exe_info
Definition: papi.h:858
char * name
Definition: iozone.c:23648
caddr_t bss_end
Definition: papi.h:697
caddr_t data_end
Definition: papi.h:695
char fullname[PAPI_HUGE_STR_LEN]
Definition: papi.h:703

Here is the call graph for this function:

PAPI_FCALL ( papif_get_hardware_info  ,
PAPIF_GET_HARDWARE_INFO  ,
(int *ncpu,int *nnodes,int *totalcpus,int *vendor,char *vendor_string,int *model,char *model_string,float *revision,float *mhz)   
)

Definition at line 303 of file papi_fwrappers.c.

315 {
316  const PAPI_hw_info_t *hwinfo;
317  int i;
318  hwinfo = PAPI_get_hardware_info( );
319  if ( hwinfo == NULL ) {
320  *ncpu = 0;
321  *nnodes = 0;
322  *totalcpus = 0;
323  *vendor = 0;
324  *model = 0;
325  *revision = 0;
326  *mhz = 0;
327  } else {
328  *ncpu = hwinfo->ncpu;
329  *nnodes = hwinfo->nnodes;
330  *totalcpus = hwinfo->totalcpus;
331  *vendor = hwinfo->vendor;
332  *model = hwinfo->model;
333  *revision = hwinfo->revision;
334  *mhz = hwinfo->cpu_max_mhz;
335 #if defined(_FORTRAN_STRLEN_AT_END)
336  strncpy( vendor_str, hwinfo->vendor_string, ( size_t ) vendor_len );
337  for ( i = ( int ) strlen( hwinfo->vendor_string ); i < vendor_len;
338  vendor_str[i++] = ' ' );
339  strncpy( model_str, hwinfo->model_string, ( size_t ) model_len );
340  for ( i = ( int ) strlen( hwinfo->model_string ); i < model_len;
341  model_str[i++] = ' ' );
342 #else
343  (void)i; /* unused... */
344  /* This case needs the passed strings to be of sufficient size *
345  * and will include the NULL character in the target string */
346  strcpy( vendor_string, hwinfo->vendor_string );
347  strcpy( model_string, hwinfo->model_string );
348 #endif
349  }
350  return;
351 }
Hardware info structure.
Definition: papi.h:775
void
Definition: iozone.c:18627
float revision
Definition: papi.h:786
int i
Definition: fileop.c:140
int nnodes
Definition: papi.h:780
char vendor_string[PAPI_MAX_STR_LEN]
Definition: papi.h:783
strcpy(filename, default_filename)
int vendor
Definition: papi.h:782
int model
Definition: papi.h:784
int cpu_max_mhz
Definition: papi.h:791
int totalcpus
Definition: papi.h:781
char model_string[PAPI_MAX_STR_LEN]
Definition: papi.h:785
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
Definition: papi.c:6046
int ncpu
Definition: papi.h:776

Here is the call graph for this function:

PAPI_FCALL ( papif_num_cmp_hwctrs  ,
PAPIF_num_cmp_hwctrs  ,
(int *cidx, int *num  
)

Definition at line 380 of file papi_fwrappers.c.

382 {
384 }
int PAPI_num_cmp_hwctrs(int cidx)
Definition: papi.c:3854
static int cidx
Definition: event_info.c:40
void int num
Definition: iozone.c:22151

Here is the call graph for this function:

PAPI_FCALL ( papif_thread_init  ,
PAPIF_THREAD_INIT  ,
(unsigned long int(*handle)(void), int *check  
)

Definition at line 547 of file papi_fwrappers.c.

549 {
551 }
* check
int PAPI_thread_init(unsigned long int(*id_fn)(void))
Definition: papi.c:118
nvmlDevice_t handle
Definition: linux-nvml.c:399

Here is the call graph for this function:

PAPI_FCALL ( papif_list_events  ,
PAPIF_LIST_EVENTS  ,
(int *EventSet, int *Events, int *number, int *check  
)

Definition at line 563 of file papi_fwrappers.c.

565 {
566  *check = PAPI_list_events( *EventSet, Events, number );
567 }
static int Events[NUM_EVENTS]
Definition: init_fini.c:8
* check
int EventSet
int PAPI_list_events(int EventSet, int *Events, int *number)
Definition: papi.c:5863

Here is the call graph for this function:

PAPI_FCALL ( papif_get_multiplex  ,
PAPIF_GET_MULTIPLEX  ,
(int *EventSet, int *check  
)

Definition at line 594 of file papi_fwrappers.c.

596 {
598 }
* check
int EventSet
int PAPI_get_multiplex(int EventSet)
Definition: papi.c:3916

Here is the call graph for this function:

PAPI_FCALL ( papif_set_multiplex  ,
PAPIF_SET_MULTIPLEX  ,
(int *EventSet, int *check  
)

Definition at line 610 of file papi_fwrappers.c.

612 {
614 }
* check
int EventSet
int PAPI_set_multiplex(int EventSet)
Definition: papi.c:3230

Here is the call graph for this function:

PAPI_FCALL ( papif_perror  ,
PAPIF_PERROR  ,
(char *message)   
)

Definition at line 631 of file papi_fwrappers.c.

634 {
635 #if defined(_FORTRAN_STRLEN_AT_END)
636  char tmp[PAPI_MAX_STR_LEN];
637  Fortran2cstring( tmp, message, PAPI_MAX_STR_LEN, message_len );
638 
639  PAPI_perror( tmp );
640 #else
641  PAPI_perror( message );
642 #endif
643 }
void PAPI_perror(char *msg)
Definition: papi.c:4520
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
long long tmp
Definition: iozone.c:12031

Here is the call graph for this function:

PAPI_FCALL ( papif_query_event  ,
PAPIF_QUERY_EVENT  ,
(int *EventCode, int *check  
)

Definition at line 663 of file papi_fwrappers.c.

665 {
666  *check = PAPI_query_event( *EventCode );
667 }
* check
int PAPI_query_event(int EventCode)
Definition: papi.c:695

Here is the call graph for this function:

PAPI_FCALL ( papif_query_named_event  ,
PAPIF_QUERY_NAMED_EVENT  ,
(char *EventName, int *check  
)

Definition at line 688 of file papi_fwrappers.c.

690 {
691  *check = PAPI_query_named_event( EventName );
692 }
* check
int PAPI_query_named_event(char *EventName)
Definition: papi.c:763

Here is the call graph for this function:

PAPI_FCALL ( papif_get_event_info  ,
PAPIF_GET_EVENT_INFO  ,
(int *EventCode, char *symbol, char *long_descr, char *short_descr,int *count, char *event_note, int *flags, int *check  
)

Definition at line 714 of file papi_fwrappers.c.

718 {
719  PAPI_event_info_t info;
720  ( void ) flags; /*Unused */
721 #if defined(_FORTRAN_STRLEN_AT_END)
722  int i;
723  if ( ( *check = PAPI_get_event_info( *EventCode, &info ) ) == PAPI_OK ) {
724  strncpy( symbol, info.symbol, ( size_t ) symbol_len );
725  for ( i = ( int ) strlen( info.symbol ); i < symbol_len;
726  symbol[i++] = ' ' );
727  strncpy( long_descr, info.long_descr, ( size_t ) long_descr_len );
728  for ( i = ( int ) strlen( info.long_descr ); i < long_descr_len;
729  long_descr[i++] = ' ' );
730  strncpy( short_descr, info.short_descr, ( size_t ) short_descr_len );
731  for ( i = ( int ) strlen( info.short_descr ); i < short_descr_len;
732  short_descr[i++] = ' ' );
733 
734  *count = ( int ) info.count;
735 
736  int note_len=0;
737 
738  strncpy( event_note, info.note, ( size_t ) event_note_len );
739  note_len=strlen(info.note);
740 
741  for ( i = note_len; i < event_note_len;
742  event_note[i++] = ' ' );
743  }
744 #else
745 /* printf("EventCode: %d\n", *EventCode ); -KSL */
746  if ( ( *check = PAPI_get_event_info( *EventCode, &info ) ) == PAPI_OK ) {
747  strncpy( symbol, info.symbol, PAPI_MAX_STR_LEN );
748  strncpy( long_descr, info.long_descr, PAPI_MAX_STR_LEN );
749  strncpy( short_descr, info.short_descr, PAPI_MAX_STR_LEN );
750  *count = info.count;
751  if (info.note)
752  strncpy( event_note, info.note,
754  }
755 /* printf("Check: %d\n", *check); -KSL */
756 #endif
757 }
unsigned int count
Definition: papi.h:982
long long flags
Definition: iozone.c:12330
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
char long_descr[PAPI_HUGE_STR_LEN]
Definition: papi.h:964
char symbol[PAPI_HUGE_STR_LEN]
Definition: papi.h:961
return PAPI_OK
Definition: linux-nvml.c:458
int count
Definition: iozone.c:22422
void
Definition: iozone.c:18627
char note[PAPI_HUGE_STR_LEN]
Definition: papi.h:1008
* check
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
Definition: papi.c:841
int i
Definition: fileop.c:140
char short_descr[PAPI_MIN_STR_LEN]
Definition: papi.h:962
int
Definition: iozone.c:18528

Here is the call graph for this function:

PAPI_FCALL ( papif_event_code_to_name  ,
PAPIF_EVENT_CODE_TO_NAME  ,
(int *EventCode, char *out, int *check  
)

Definition at line 773 of file papi_fwrappers.c.

776 {
777 #if defined(_FORTRAN_STRLEN_AT_END)
778  char tmp[PAPI_MAX_STR_LEN];
779  int i;
780  *check = PAPI_event_code_to_name( *EventCode, tmp );
781  /* tmp has \0 within PAPI_MAX_STR_LEN chars so strncpy is safe */
782  strncpy( out_str, tmp, ( size_t ) out_len );
783  /* overwrite any NULLs and trailing garbage in out_str */
784  for ( i = ( int ) strlen( tmp ); i < out_len; out_str[i++] = ' ' );
785 #else
786  /* The array "out" passed by the user must be sufficiently long */
787  *check = PAPI_event_code_to_name( *EventCode, out );
788 #endif
789 }
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
* check
int i
Definition: fileop.c:140
int PAPI_event_code_to_name(int EventCode, char *out)
Definition: papi.c:920
long long tmp
Definition: iozone.c:12031

Here is the call graph for this function:

PAPI_FCALL ( papif_event_name_to_code  ,
PAPIF_EVENT_NAME_TO_CODE  ,
(char *in, int *out, int *check  
)

Definition at line 805 of file papi_fwrappers.c.

808 {
809 #if defined(_FORTRAN_STRLEN_AT_END)
810  int slen, i;
811  char tmpin[PAPI_MAX_STR_LEN];
812 
813  /* What is the maximum number of chars to copy ? */
814  slen = in_len < PAPI_MAX_STR_LEN ? in_len : PAPI_MAX_STR_LEN;
815  strncpy( tmpin, in_str, ( size_t ) slen );
816 
817  /* Remove trailing blanks from initial Fortran string */
818  for ( i = slen - 1; i > -1 && tmpin[i] == ' '; tmpin[i--] = '\0' );
819 
820  /* Make sure string is NULL terminated before call */
821  tmpin[PAPI_MAX_STR_LEN - 1] = '\0';
822  if ( slen < PAPI_MAX_STR_LEN )
823  tmpin[slen] = '\0';
824 
825  *check = PAPI_event_name_to_code( tmpin, out );
826 #else
827  /* This will have trouble if argument in is not null terminated */
828  *check = PAPI_event_name_to_code( in, out );
829 #endif
830 }
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
* check
int i
Definition: fileop.c:140
int PAPI_event_name_to_code(char *in, int *out)
Definition: papi.c:1003

Here is the call graph for this function:

PAPI_FCALL ( papif_enum_event  ,
PAPIF_ENUM_EVENT  ,
(int *EventCode, int *modifier, int *check  
)

Definition at line 857 of file papi_fwrappers.c.

859 {
860  *check = PAPI_enum_event( EventCode, *modifier );
861 }
int PAPI_enum_event(int *EventCode, int modifier)
Definition: papi.c:1143
* check

Here is the call graph for this function:

PAPI_FCALL ( papif_read  ,
PAPIF_READ  ,
(int *EventSet, long long *values, int *check  
)

Definition at line 873 of file papi_fwrappers.c.

875 {
876  *check = PAPI_read( *EventSet, values );
877 }
* check
int EventSet
int PAPI_read(int EventSet, long long *values)
Definition: papi.c:2469
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_read_ts  ,
PAPIF_READ_TS  ,
(int *EventSet, long long *values, long long *cycles, int *check  
)

Definition at line 889 of file papi_fwrappers.c.

891 {
892  *check = PAPI_read_ts( *EventSet, values, cycles );
893 }
* check
int EventSet
int PAPI_read_ts(int EventSet, long long *values, long long *cycles)
Definition: papi.c:2557
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_remove_event  ,
PAPIF_REMOVE_EVENT  ,
(int *EventSet, int *Event, int *check  
)

Definition at line 905 of file papi_fwrappers.c.

907 {
909 }
int PAPI_remove_event(int EventSet, int EventCode)
Definition: papi.c:1692
* check
int EventSet
int Event[MAX_EVENTS]

Here is the call graph for this function:

PAPI_FCALL ( papif_remove_named_event  ,
PAPIF_REMOVE_NAMED_EVENT  ,
(int *EventSet, char *EventName, int *check  
)

Definition at line 930 of file papi_fwrappers.c.

932 {
933  *check = PAPI_remove_named_event( *EventSet, EventName );
934 }
* check
int EventSet
int PAPI_remove_named_event(int EventSet, char *EventName)
Definition: papi.c:1886

Here is the call graph for this function:

PAPI_FCALL ( papif_remove_events  ,
PAPIF_REMOVE_EVENTS  ,
(int *EventSet, int *Events, int *number, int *check  
)

Definition at line 947 of file papi_fwrappers.c.

949 {
950  *check = PAPI_remove_events( *EventSet, Events, *number );
951 }
static int Events[NUM_EVENTS]
Definition: init_fini.c:8
int PAPI_remove_events(int EventSet, int *Events, int number)
Definition: papi.c:5794
* check
int EventSet

Here is the call graph for this function:

PAPI_FCALL ( papif_set_cmp_domain  ,
PAPIF_SET_CMP_DOMAIN  ,
(int *domain, int *cidx, int *check  
)

Definition at line 1008 of file papi_fwrappers.c.

1010 {
1011  *check = PAPI_set_cmp_domain( *domain, *cidx );
1012 }
* check
int PAPI_set_cmp_domain(int domain, int cidx)
Definition: papi.c:5622
static int cidx
Definition: event_info.c:40

Here is the call graph for this function:

PAPI_FCALL ( papif_set_granularity  ,
PAPIF_SET_GRANULARITY  ,
(int *granularity, int *check  
)

Definition at line 1024 of file papi_fwrappers.c.

1026 {
1027  *check = PAPI_set_granularity( *granularity );
1028 }
* check
int PAPI_set_granularity(int granularity)
Definition: papi.c:5421

Here is the call graph for this function:

PAPI_FCALL ( papif_set_cmp_granularity  ,
PAPIF_SET_CMP_GRANULARITY  ,
(int *granularity, int *cidx, int *check  
)

Definition at line 1040 of file papi_fwrappers.c.

1042 {
1043  *check = PAPI_set_cmp_granularity( *granularity, *cidx );
1044 }
int PAPI_set_cmp_granularity(int granularity, int cidx)
Definition: papi.c:5486
* check
static int cidx
Definition: event_info.c:40

Here is the call graph for this function:

PAPI_FCALL ( papif_state  ,
PAPIF_STATE  ,
(int *EventSet, int *status, int *check  
)

Definition at line 1086 of file papi_fwrappers.c.

1088 {
1089  *check = PAPI_state( *EventSet, status );
1090 }
* check
int PAPI_state(int EventSet, int *status)
Definition: papi.c:2956
int EventSet
long long status
Definition: iozone.c:1335

Here is the call graph for this function:

PAPI_FCALL ( papif_stop  ,
PAPIF_STOP  ,
(int *EventSet, long long *values, int *check  
)

Definition at line 1102 of file papi_fwrappers.c.

1104 {
1105  *check = PAPI_stop( *EventSet, values );
1106 }
int PAPI_stop(int EventSet, long long *values)
Definition: papi.c:2225
* check
int EventSet
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_write  ,
PAPIF_WRITE  ,
(int *EventSet, long long *values, int *check  
)

Definition at line 1118 of file papi_fwrappers.c.

1120 {
1121  *check = PAPI_write( *EventSet, values );
1122 }
int PAPI_write(int EventSet, long long *values)
Definition: papi.c:2720
* check
int EventSet
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_lock  ,
PAPIF_LOCK  ,
(int *lock, int *check  
)

Definition at line 1134 of file papi_fwrappers.c.

1136 {
1137  *check = PAPI_lock( *lock );
1138 }
* check
atomic_p lock[]
Definition: aix.c:25
int PAPI_lock(int lck)
Definition: papi.c:6262

Here is the call graph for this function:

PAPI_FCALL ( papif_unlock  ,
PAPIF_unlock  ,
(int *lock, int *check  
)

Definition at line 1150 of file papi_fwrappers.c.

1152 {
1153  *check = PAPI_unlock( *lock );
1154 }
* check
atomic_p lock[]
Definition: aix.c:25
int PAPI_unlock(int lck)
Definition: papi.c:6282

Here is the call graph for this function:

PAPI_FCALL ( papif_start_counters  ,
PAPIF_START_COUNTERS  ,
(int *events, int *array_len, int *check  
)

Definition at line 1168 of file papi_fwrappers.c.

1170 {
1171  *check = PAPI_start_counters( events, *array_len );
1172 }
* check
char events[MAX_EVENTS][BUFSIZ]
int PAPI_start_counters(int *events, int array_len)
Definition: papi_hl.c:593

Here is the call graph for this function:

PAPI_FCALL ( papif_read_counters  ,
PAPIF_READ_COUNTERS  ,
(long long *values, int *array_len, int *check  
)

Definition at line 1184 of file papi_fwrappers.c.

1186 {
1187  *check = PAPI_read_counters( values, *array_len );
1188 }
* check
int PAPI_read_counters(long long *values, int array_len)
Definition: papi_hl.c:706
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_stop_counters  ,
PAPIF_STOP_COUNTERS  ,
(long long *values, int *array_len, int *check  
)

Definition at line 1200 of file papi_fwrappers.c.

1202 {
1203  *check = PAPI_stop_counters( values, *array_len );
1204 }
* check
int PAPI_stop_counters(long long *values, int array_len)
Definition: papi_hl.c:803
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_accum_counters  ,
PAPIF_ACCUM_COUNTERS  ,
(long long *values, int *array_len, int *check  
)

Definition at line 1216 of file papi_fwrappers.c.

1218 {
1219  *check = PAPI_accum_counters( values, *array_len );
1220 }
int PAPI_accum_counters(long long *values, int array_len)
Definition: papi_hl.c:756
* check
static long long values[NUM_EVENTS]
Definition: init_fini.c:10

Here is the call graph for this function:

PAPI_FCALL ( papif_ipc  ,
PAPIF_IPC  ,
(float *rtime, float *ptime, long long *ins, float *ipc,int *check  
)

Definition at line 1247 of file papi_fwrappers.c.

1250 {
1251  *check = PAPI_ipc( rtime, ptime, ins, ipc );
1252 }
int PAPI_ipc(float *rtime, float *ptime, long long *ins, float *ipc)
Definition: papi_hl.c:316
* check

Here is the call graph for this function:

PAPI_FCALL ( papif_epc  ,
PAPIF_EPC  ,
(int event, float *rtime, float *ptime,long long *ref, long long *core, long long *evt, float *epc,int *check  
)

Definition at line 1264 of file papi_fwrappers.c.

1268 {
1269  *check = PAPI_epc( event, rtime, ptime, ref, core, evt, epc );
1270 }
device[deviceId] domain[domainId] event
Definition: linux-cuda.c:306
* check
int PAPI_epc(int event, float *rtime, float *ptime, long long *ref, long long *core, long long *evt, float *epc)
Definition: papi_hl.c:383

Here is the call graph for this function:

PAPI_FCALL ( papif_flips  ,
PAPIF_FLIPS  ,
(float *real_time, float *proc_time, long long *flpins,float *mflips, int *check  
)

Definition at line 1282 of file papi_fwrappers.c.

1285 {
1286  *check = PAPI_flips( real_time, proc_time, flpins, mflips );
1287 }
* check
int PAPI_flips(float *rtime, float *ptime, long long *flpins, float *mflips)
Definition: papi_hl.c:204

Here is the call graph for this function:

PAPI_FCALL ( papif_flops  ,
PAPIF_FLOPS  ,
(float *real_time, float *proc_time, long long *flpops,float *mflops, int *check  
)

Definition at line 1299 of file papi_fwrappers.c.

1302 {
1303  *check = PAPI_flops( real_time, proc_time, flpops, mflops );
1304 }
int PAPI_flops(float *rtime, float *ptime, long long *flpops, float *mflops)
Definition: papi_hl.c:259
* check

Here is the call graph for this function:

PAPI_FCALL ( papif_get_preload  ,
PAPIF_GET_PRELOAD  ,
(char *lib_preload_env, int *check  
)

Definition at line 1342 of file papi_fwrappers.c.

1345 {
1346  PAPI_option_t p;
1347 #if defined(_FORTRAN_STRLEN_AT_END)
1348  int i;
1349 
1350  if ( ( *check = PAPI_get_opt( PAPI_PRELOAD, &p ) ) == PAPI_OK ) {
1351  strncpy( lib_preload_env, p.preload.lib_preload_env,
1352  ( size_t ) lib_preload_env_len );
1353  for ( i = ( int ) strlen( p.preload.lib_preload_env );
1354  i < lib_preload_env_len; lib_preload_env[i++] = ' ' );
1355  }
1356 #else
1357  if ( ( *check = PAPI_get_opt( PAPI_PRELOAD, &p ) ) == PAPI_OK ) {
1358  strncpy( lib_preload_env, p.preload.lib_preload_env, PAPI_MAX_STR_LEN );
1359  }
1360 #endif
1361 }
#define PAPI_PRELOAD
Definition: fpapi.h:56
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
return PAPI_OK
Definition: linux-nvml.c:458
A pointer to the following is passed to PAPI_set/get_opt()
Definition: papi.h:843
* check
char lib_preload_env[PAPI_MAX_STR_LEN]
Definition: papi.h:617
int i
Definition: fileop.c:140
int PAPI_get_opt(int option, PAPI_option_t *ptr)
Definition: papi.c:4030
PAPI_preload_info_t preload
Definition: papi.h:845

Here is the call graph for this function:

PAPI_FCALL ( papif_get_granularity  ,
PAPIF_GET_GRANULARITY  ,
(int *eventset, int *granularity, int *mode, int *check  
)

Definition at line 1373 of file papi_fwrappers.c.

1375 {
1376  PAPI_option_t g;
1377 
1378  if ( *mode == PAPI_DEFGRN ) {
1379  *granularity = PAPI_get_opt( *mode, &g );
1380  *check = PAPI_OK;
1381  } else if ( *mode == PAPI_GRANUL ) {
1382  g.granularity.eventset = *eventset;
1383  if ( ( *check = PAPI_get_opt( *mode, &g ) ) == PAPI_OK ) {
1384  *granularity = g.granularity.granularity;
1385  }
1386  } else {
1387  *check = PAPI_EINVAL;
1388  }
1389 }
PAPI_granularity_option_t granularity
Definition: papi.h:848
return PAPI_OK
Definition: linux-nvml.c:458
A pointer to the following is passed to PAPI_set/get_opt()
Definition: papi.h:843
return PAPI_EINVAL
Definition: linux-nvml.c:408
* check
int PAPI_get_opt(int option, PAPI_option_t *ptr)
Definition: papi.c:4030
#define PAPI_DEFGRN
Definition: fpapi.h:51
#define PAPI_GRANUL
Definition: fpapi.h:52

Here is the call graph for this function:

PAPI_FCALL ( papif_get_domain  ,
PAPIF_GET_DOMAIN  ,
(int *eventset, int *domain, int *mode, int *check  
)

Definition at line 1401 of file papi_fwrappers.c.

1403 {
1404  PAPI_option_t d;
1405 
1406  if ( *mode == PAPI_DEFDOM ) {
1407  *domain = PAPI_get_opt( *mode, NULL );
1408  *check = PAPI_OK;
1409  } else if ( *mode == PAPI_DOMAIN ) {
1410  d.domain.eventset = *eventset;
1411  if ( ( *check = PAPI_get_opt( *mode, &d ) ) == PAPI_OK ) {
1412  *domain = d.domain.domain;
1413  }
1414  } else {
1415  *check = PAPI_EINVAL;
1416  }
1417 }
return PAPI_OK
Definition: linux-nvml.c:458
A pointer to the following is passed to PAPI_set/get_opt()
Definition: papi.h:843
return PAPI_EINVAL
Definition: linux-nvml.c:408
* check
int PAPI_get_opt(int option, PAPI_option_t *ptr)
Definition: papi.c:4030
#define PAPI_DEFDOM
Definition: fpapi.h:49
#define PAPI_DOMAIN
Definition: fpapi.h:50
PAPI_domain_option_t domain
Definition: papi.h:850

Here is the call graph for this function:

PAPI_FCALL ( papif_set_event_domain  ,
PAPIF_SET_EVENT_DOMAIN  ,
(int *es, int *domain, int *check  
)

Definition at line 1441 of file papi_fwrappers.c.

1443 {
1444  PAPI_option_t d;
1445 
1446  d.domain.domain = *domain;
1447  d.domain.eventset = *es;
1448  *check = PAPI_set_opt( PAPI_DOMAIN, &d );
1449 }
A pointer to the following is passed to PAPI_set/get_opt()
Definition: papi.h:843
int PAPI_set_opt(int option, PAPI_option_t *ptr)
Definition: papi.c:3360
* check
#define PAPI_DOMAIN
Definition: fpapi.h:50
PAPI_domain_option_t domain
Definition: papi.h:850

Here is the call graph for this function:

Variable Documentation

* check = PAPI_set_opt( PAPI_INHERIT, &i )

Definition at line 1466 of file papi_fwrappers.c.

i inherit inherit = *inherit

Definition at line 1465 of file papi_fwrappers.c.