19 inline namespace _V1 {
24 ur_platform_info_t UrCode) {
25 size_t ResultSize = 0;
27 Plugin->call<UrApiKind::urPlatformGetInfo>(Plt, UrCode, 0,
nullptr,
29 if (ResultSize == 0) {
32 std::unique_ptr<char[]> Result(
new char[ResultSize]);
34 Plugin->call<UrApiKind::urPlatformGetInfo>(Plt, UrCode, ResultSize,
35 Result.get(),
nullptr);
39 template <
typename Param>
40 typename std::enable_if<
41 std::is_same<typename Param::return_type, std::string>::value,
45 "Invalid platform information descriptor");
50 template <
typename Param>
51 typename std::enable_if<std::is_same<Param, info::platform::extensions>::value,
52 std::vector<std::string>>::type
55 "Invalid platform information descriptor");
std::enable_if< std::is_same< typename Param::return_type, std::string >::value, std::string >::type get_platform_info(ur_platform_handle_t Plt, const PluginPtr &Plugin)
std::string get_platform_info_string_impl(ur_platform_handle_t Plt, const PluginPtr &Plugin, ur_platform_info_t UrCode)
std::vector< std::string > split_string(std::string_view str, char delimeter)
std::shared_ptr< plugin > PluginPtr
C++ utilities for Unified Runtime integration.