Example #1
0
 /// <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)));
 }
Example #2
0
 private static extern IntPtr TF_DeviceListNameImpl(SafeDeviceListHandle list, int index, SafeStatusHandle status);
Example #3
0
 public static extern IntPtr TF_DeviceListType(SafeDeviceListHandle list, int index, SafeStatusHandle status);
Example #4
0
 public static extern int TF_DeviceListCount(SafeDeviceListHandle list);
Example #5
0
 protected string TF_DeviceListName(SafeDeviceListHandle list, int index, SafeStatusHandle status)
 => c_api.TF_DeviceListName(list, index, status);
Example #6
0
 protected string TF_DeviceListType(SafeDeviceListHandle list, int index, SafeStatusHandle status)
 => c_api.StringPiece(c_api.TF_DeviceListType(list, index, status));
Example #7
0
 protected int TF_DeviceListCount(SafeDeviceListHandle list)
 => c_api.TF_DeviceListCount(list);