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

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

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.

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

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.

00218 {
00219     *check = PAPI_get_dmem_info( ( PAPI_dmem_info_t * ) dest );
00220 }

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.

00201 {
00202     *check = PAPI_destroy_eventset( EventSet );
00203 }

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.

00185 {
00186     *check = PAPI_assign_eventset_component( *EventSet, *cidx );
00187 }

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.

00169 {
00170     *check = PAPI_create_eventset( EventSet );
00171 }

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.

00153 {
00154     *check = PAPI_cleanup_eventset( *EventSet );
00155 }

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.

00137 {
00138     *check = PAPI_add_events( *EventSet, Events, *number );
00139 }

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.

00120 {
00121     *check = PAPI_add_named_event( *EventSet, EventName );
00122 }

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.

00095 {
00096     *check = PAPI_add_event( *EventSet, *Event );
00097 }

Here is the call graph for this function:

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

Definition at line 77 of file papi_fwrappers.c.

00079 {
00080     *check = PAPI_accum( *EventSet, values );
00081 }

Here is the call graph for this function:


Generated on 26 Jan 2016 for PAPI by  doxygen 1.6.1