papi_fwrappers.c File Reference

Include dependency graph for papi_fwrappers.c:

Go to the source code of this file.

Defines

#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))

Define Documentation

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

Definition at line 38 of file papi_fwrappers.c.


Function Documentation

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 305 of file papi_fwrappers.c.

00317 {
00318     const PAPI_hw_info_t *hwinfo;
00319     int i;
00320     hwinfo = PAPI_get_hardware_info(  );
00321     if ( hwinfo == NULL ) {
00322         *ncpu = 0;
00323         *nnodes = 0;
00324         *totalcpus = 0;
00325         *vendor = 0;
00326         *model = 0;
00327         *revision = 0;
00328         *mhz = 0;
00329     } else {
00330         *ncpu = hwinfo->ncpu;
00331         *nnodes = hwinfo->nnodes;
00332         *totalcpus = hwinfo->totalcpus;
00333         *vendor = hwinfo->vendor;
00334         *model = hwinfo->model;
00335         *revision = hwinfo->revision;
00336         *mhz = hwinfo->cpu_max_mhz;
00337 #if defined(_FORTRAN_STRLEN_AT_END)
00338         strncpy( vendor_str, hwinfo->vendor_string, ( size_t ) vendor_len );
00339         for ( i = ( int ) strlen( hwinfo->vendor_string ); i < vendor_len;
00340               vendor_str[i++] = ' ' );
00341         strncpy( model_str, hwinfo->model_string, ( size_t ) model_len );
00342         for ( i = ( int ) strlen( hwinfo->model_string ); i < model_len;
00343               model_str[i++] = ' ' );
00344 #else
00345         (void)i; /* unused...  */
00346         /* This case needs the passed strings to be of sufficient size *
00347          * and will include the NULL character in the target string    */
00348         strcpy( vendor_string, hwinfo->vendor_string );
00349         strcpy( model_string, hwinfo->model_string );
00350 #endif
00351     }
00352     return;
00353 }

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 244 of file papi_fwrappers.c.

00249 {
00250     PAPI_option_t e;
00251 /* WARNING: The casts from caddr_t to long below WILL BREAK on systems with
00252     64-bit addresses. I did it here because I was lazy. And because I wanted
00253     to get rid of those pesky gcc warnings. If you find a 64-bit system,
00254     conditionalize the cast with (yet another) #ifdef...
00255 */
00256     if ( ( *check = PAPI_get_opt( PAPI_EXEINFO, &e ) ) == PAPI_OK ) {
00257 #if defined(_FORTRAN_STRLEN_AT_END)
00258         int i;
00259         strncpy( fullname, e.exe_info->fullname, ( size_t ) fullname_len );
00260         for ( i = ( int ) strlen( e.exe_info->fullname ); i < fullname_len;
00261               fullname[i++] = ' ' );
00262         strncpy( name, e.exe_info->address_info.name, ( size_t ) name_len );
00263         for ( i = ( int ) strlen( e.exe_info->address_info.name ); i < name_len;
00264               name[i++] = ' ' );
00265 #else
00266         strncpy( fullname, e.exe_info->fullname, PAPI_MAX_STR_LEN );
00267         strncpy( name, e.exe_info->address_info.name, PAPI_MAX_STR_LEN );
00268 #endif
00269         *text_start = ( long ) e.exe_info->address_info.text_start;
00270         *text_end = ( long ) e.exe_info->address_info.text_end;
00271         *data_start = ( long ) e.exe_info->address_info.data_start;
00272         *data_end = ( long ) e.exe_info->address_info.data_end;
00273         *bss_start = ( long ) e.exe_info->address_info.bss_start;
00274         *bss_end = ( long ) e.exe_info->address_info.bss_end;
00275     }
00276 }

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 218 of file papi_fwrappers.c.

00220 {
00221     *check = PAPI_get_dmem_info( ( PAPI_dmem_info_t * ) dest );
00222 }

Here is the call graph for this function:

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

Definition at line 201 of file papi_fwrappers.c.

00203 {
00204     *check = PAPI_destroy_eventset( EventSet );
00205 }

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 185 of file papi_fwrappers.c.

00187 {
00188     *check = PAPI_assign_eventset_component( *EventSet, *cidx );
00189 }

Here is the call graph for this function:

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

Definition at line 169 of file papi_fwrappers.c.

00171 {
00172     *check = PAPI_create_eventset( EventSet );
00173 }

Here is the call graph for this function:

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

Definition at line 153 of file papi_fwrappers.c.

00155 {
00156     *check = PAPI_cleanup_eventset( *EventSet );
00157 }

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 137 of file papi_fwrappers.c.

00139 {
00140     *check = PAPI_add_events( *EventSet, Events, *number );
00141 }

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 120 of file papi_fwrappers.c.

00122 {
00123     *check = PAPI_add_named_event( *EventSet, EventName );
00124 }

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 95 of file papi_fwrappers.c.

00097 {
00098     *check = PAPI_add_event( *EventSet, *Event );
00099 }

Here is the call graph for this function:

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

Definition at line 79 of file papi_fwrappers.c.

00081 {
00082     *check = PAPI_accum( *EventSet, values );
00083 }

Here is the call graph for this function:


Generated on 8 Sep 2016 for PAPI by  doxygen 1.6.1