PAPI 7.1.0.0
Loading...
Searching...
No Matches
vendor_common.c File Reference
Include dependency graph for vendor_common.c:

Go to the source code of this file.

Macros

#define MAX_DEVICE_COUNT   (8)
 

Functions

static int load_common_symbols (void)
 
static int unload_common_symbols (void)
 
static int initialize_device_table (void)
 
static int finalize_device_table (void)
 
int vendorc_init (void)
 
int vendorc_shutdown (void)
 
int vendorc_err_get_last (const char **error)
 

Variables

char error_string [PAPI_MAX_STR_LEN]
 
unsigned int _templ_lock
 
device_table_t device_table
 
device_table_tdevice_table_p
 

Macro Definition Documentation

◆ MAX_DEVICE_COUNT

#define MAX_DEVICE_COUNT   (8)

Function Documentation

◆ finalize_device_table()

int finalize_device_table ( void  )
static

Definition at line 87 of file vendor_common.c.

88{
91 return PAPI_OK;
92}
#define PAPI_OK
Definition: f90papi.h:73
#define papi_free(a)
Definition: papi_memory.h:35
hsa_agent_t devices[PAPI_ROCM_MAX_DEV_COUNT]
Definition: roc_common.h:23
device_table_t * device_table_p
Definition: vendor_common.c:7
Here is the caller graph for this function:

◆ initialize_device_table()

int initialize_device_table ( void  )
static

Definition at line 67 of file vendor_common.c.

68{
69#define MAX_DEVICE_COUNT (8)
71 if (NULL == devices) {
72 return PAPI_ENOMEM;
73 }
74
75 int i;
76 for (i = 0; i < MAX_DEVICE_COUNT; ++i) {
77 devices[i].id = (unsigned int) i;
78 }
79
82
83 return PAPI_OK;
84}
int i
#define PAPI_ENOMEM
Definition: f90papi.h:16
static nvmlDevice_t * devices
Definition: linux-nvml.c:146
#define papi_calloc(a, b)
Definition: papi_memory.h:37
int
Definition: sde_internal.h:89
device_table_t device_table
Definition: vendor_common.c:6
#define MAX_DEVICE_COUNT
Here is the caller graph for this function:

◆ load_common_symbols()

int load_common_symbols ( void  )
static

Definition at line 55 of file vendor_common.c.

56{
57 return PAPI_OK;
58}
Here is the caller graph for this function:

◆ unload_common_symbols()

int unload_common_symbols ( void  )
static

Definition at line 61 of file vendor_common.c.

62{
63 return PAPI_OK;
64}
Here is the caller graph for this function:

◆ vendorc_err_get_last()

int vendorc_err_get_last ( const char **  error)

Definition at line 48 of file vendor_common.c.

49{
50 *error = error_string;
51 return PAPI_OK;
52}
char error_string[PAPI_MAX_STR_LEN]
Definition: vendor_common.c:3
Here is the caller graph for this function:

◆ vendorc_init()

int vendorc_init ( void  )

Definition at line 15 of file vendor_common.c.

16{
17 int papi_errno;
18
19 papi_errno = load_common_symbols();
20 if (papi_errno != PAPI_OK) {
21 return papi_errno;
22 }
23
24 papi_errno = initialize_device_table();
25 if (papi_errno != PAPI_OK) {
26 goto fn_fail;
27 }
28
30
31 fn_exit:
32 return papi_errno;
33 fn_fail:
35 goto fn_exit;
36}
static int initialize_device_table(void)
Definition: vendor_common.c:67
static int unload_common_symbols(void)
Definition: vendor_common.c:61
static int load_common_symbols(void)
Definition: vendor_common.c:55
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vendorc_shutdown()

int vendorc_shutdown ( void  )

Definition at line 39 of file vendor_common.c.

40{
42 device_table_p = NULL;
44 return PAPI_OK;
45}
static int finalize_device_table(void)
Definition: vendor_common.c:87
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _templ_lock

unsigned int _templ_lock

Definition at line 4 of file vendor_common.c.

◆ device_table

device_table_t device_table

Definition at line 6 of file vendor_common.c.

◆ device_table_p

device_table_t* device_table_p

Definition at line 7 of file vendor_common.c.

◆ error_string

char error_string[PAPI_MAX_STR_LEN]

Definition at line 3 of file vendor_common.c.