| 843 | } |
| 844 | |
| 845 | XGB_DLL int XGDMatrixGetInfoRef(DMatrixHandle handle, char const *field, char const **out_array) { |
| 846 | API_BEGIN(); |
| 847 | CHECK_HANDLE(); |
| 848 | xgboost_CHECK_C_ARG_PTR(field); |
| 849 | xgboost_CHECK_C_ARG_PTR(out_array); |
| 850 | |
| 851 | auto p_fmat = CastDMatrixHandle(handle); |
| 852 | MetaInfo const &info = p_fmat->Info(); |
| 853 | auto aif = info.GetInfo(p_fmat->Ctx(), StringView{field}); |
| 854 | |
| 855 | auto &res = p_fmat->GetThreadLocal().ret_str; |
| 856 | res = aif.ArrayInterfaceStr(); |
| 857 | *out_array = res.c_str(); |
| 858 | |
| 859 | API_END(); |
| 860 | } |
| 861 | |
| 862 | namespace { |
| 863 | template <typename T> |
nothing calls this directly
no test coverage detected