/// <summary> /// Retrieves the full name of the device (e.g. /job:worker/replica:0/...) /// </summary> /// <param name="list">TF_DeviceList*</param> /// <param name="index"></param> /// <param name="status">TF_Status*</param> public static string TF_DeviceListName(SafeDeviceListHandle list, int index, SafeStatusHandle status) { using var _ = list.Lease(); return(StringPiece(TF_DeviceListNameImpl(list, index, status))); }
private static extern IntPtr TF_DeviceListNameImpl(SafeDeviceListHandle list, int index, SafeStatusHandle status);
public static extern IntPtr TF_DeviceListType(SafeDeviceListHandle list, int index, SafeStatusHandle status);
public static extern int TF_DeviceListCount(SafeDeviceListHandle list);
protected string TF_DeviceListName(SafeDeviceListHandle list, int index, SafeStatusHandle status) => c_api.TF_DeviceListName(list, index, status);
protected string TF_DeviceListType(SafeDeviceListHandle list, int index, SafeStatusHandle status) => c_api.StringPiece(c_api.TF_DeviceListType(list, index, status));
protected int TF_DeviceListCount(SafeDeviceListHandle list) => c_api.TF_DeviceListCount(list);