diff options
Diffstat (limited to 'libsmctrl.h')
| -rw-r--r-- | libsmctrl.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libsmctrl.h b/libsmctrl.h index f342afa..64ae7a7 100644 --- a/libsmctrl.h +++ b/libsmctrl.h | |||
| @@ -50,15 +50,21 @@ extern void set_sm_mask(uint64_t mask) __attribute__((deprecated("Use libsmctrl_ | |||
| 50 | 50 | ||
| 51 | /* INFORMATIONAL FUNCTIONS */ | 51 | /* INFORMATIONAL FUNCTIONS */ |
| 52 | 52 | ||
| 53 | // Get total number of TPCs on device number `dev`. | ||
| 54 | extern int libsmctrl_get_tpc_info(uint32_t* num_tpcs, int dev); | ||
| 55 | // Get number of GPCs for devices number `dev`, and a GPC-indexed array | 53 | // Get number of GPCs for devices number `dev`, and a GPC-indexed array |
| 56 | // containing masks of which TPCs are associated with each GPC. | 54 | // containing masks of which TPCs are associated with each GPC. |
| 57 | // Note that the `nvdebug` module must be loaded to use this function. | 55 | // Note that the `nvdebug` module must be loaded to use this function. |
| 58 | // @param num_enabled_gpcs Location to store number of GPCs in | 56 | // @param num_enabled_gpcs (out) Location to store number of GPCs in |
| 59 | // @param tpcs_for_gpc Pointer to store pointer to output buffer at | 57 | // @param tpcs_for_gpc (out) Pointer to store pointer to output buffer at |
| 60 | // @return 0 on success, error code on error | 58 | // @param dev (in) `nvdebug` device ID |
| 59 | // @return 0 on success, `errno`-compatible error code on failure | ||
| 61 | extern int libsmctrl_get_gpc_info(uint32_t* num_enabled_gpcs, uint64_t** tpcs_for_gpc, int dev); | 60 | extern int libsmctrl_get_gpc_info(uint32_t* num_enabled_gpcs, uint64_t** tpcs_for_gpc, int dev); |
| 61 | // Get total number of TPCs on device number `dev`. Requires `nvdebug`. | ||
| 62 | // @param num_tpcs (out) Location to store number of TPCs at | ||
| 63 | // @param dev (in) `nvdebug` device ID | ||
| 64 | // @return 0 on success, `errno`-compatible error code on failure | ||
| 65 | extern int libsmctrl_get_tpc_info(uint32_t* num_tpcs, int dev); | ||
| 66 | // Identical to above, but for a CUDA device ID. Does not require `nvdebug`. | ||
| 67 | extern int libsmctrl_get_tpc_info_cuda(uint32_t* num_tpcs, int cuda_dev); | ||
| 62 | 68 | ||
| 63 | #ifdef __cplusplus | 69 | #ifdef __cplusplus |
| 64 | } | 70 | } |
