aqlprofile: get version API

Change-Id: I3a85c088bfff3f54d8829e17cdafd7dfcdfb0c1d
Cette révision appartient à :
Evgeny
2018-04-27 20:20:47 -05:00
révisé par Evgeny Shcherbakov
Parent 11e13704ea
révision 0fcd2fa56e
2 fichiers modifiés avec 17 ajouts et 0 suppressions
+6
Voir le fichier
@@ -477,6 +477,12 @@ hsa_status_t hsa_system_get_major_extension_table(uint16_t extension, uint16_t v
} }
hsa_ven_amd_aqlprofile_1_00_pfn_t ext_table; hsa_ven_amd_aqlprofile_1_00_pfn_t ext_table;
ext_table.hsa_ven_amd_aqlprofile_version_major =
(decltype(::hsa_ven_amd_aqlprofile_version_major)*)
os::GetExportAddress(lib, "hsa_ven_amd_aqlprofile_version_major");
ext_table.hsa_ven_amd_aqlprofile_version_minor =
(decltype(::hsa_ven_amd_aqlprofile_version_minor)*)
os::GetExportAddress(lib, "hsa_ven_amd_aqlprofile_version_minor");
ext_table.hsa_ven_amd_aqlprofile_error_string = ext_table.hsa_ven_amd_aqlprofile_error_string =
(decltype(::hsa_ven_amd_aqlprofile_error_string)*) (decltype(::hsa_ven_amd_aqlprofile_error_string)*)
os::GetExportAddress(lib, "hsa_ven_amd_aqlprofile_error_string"); os::GetExportAddress(lib, "hsa_ven_amd_aqlprofile_error_string");
+11
Voir le fichier
@@ -50,10 +50,18 @@
#include <stdint.h> #include <stdint.h>
#include "hsa.h" #include "hsa.h"
#define HSA_AQLPROFILE_VERSION_MAJOR 2
#define HSA_AQLPROFILE_VERSION_MINUR 0
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif // __cplusplus #endif // __cplusplus
////////////////////////////////////////////////////////////////////////////////
// Library version
uint32_t hsa_ven_amd_aqlprofile_version_major();
uint32_t hsa_ven_amd_aqlprofile_version_minor();
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
// Library API: // Library API:
// The library provides helper methods for instantiation of // The library provides helper methods for instantiation of
@@ -292,6 +300,9 @@ static const char kAqlProfileLib[] = "libhsa-amd-aqlprofile.so.1";
* @brief Extension function table. * @brief Extension function table.
*/ */
typedef struct hsa_ven_amd_aqlprofile_1_00_pfn_s { typedef struct hsa_ven_amd_aqlprofile_1_00_pfn_s {
uint32_t (*hsa_ven_amd_aqlprofile_version_major)();
uint32_t (*hsa_ven_amd_aqlprofile_version_minor)();
hsa_status_t (*hsa_ven_amd_aqlprofile_error_string)( hsa_status_t (*hsa_ven_amd_aqlprofile_error_string)(
const char** str); const char** str);