public DeviceDescriptorVector(DeviceDescriptorVector other) : this(CNTKLibPINVOKE.new_DeviceDescriptorVector__SWIG_1(DeviceDescriptorVector.getCPtr(other)), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public DeviceDescriptorVectorEnumerator(DeviceDescriptorVector collection) { collectionRef = collection; currentIndex = -1; currentObject = null; currentSize = collectionRef.Count; }
private static void _SetExcludedDevices(DeviceDescriptorVector excluded) { CNTKLibPINVOKE.DeviceDescriptor__SetExcludedDevices(DeviceDescriptorVector.getCPtr(excluded)); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public void SetRange(int index, DeviceDescriptorVector values) { CNTKLibPINVOKE.DeviceDescriptorVector_SetRange(swigCPtr, index, DeviceDescriptorVector.getCPtr(values)); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
private static DeviceDescriptorVector _AllDevices() { DeviceDescriptorVector ret = new DeviceDescriptorVector(CNTKLibPINVOKE.DeviceDescriptor__AllDevices(), false); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// Set devices to be excluded. /// </summary> /// <param name="excluded"></param> public static void SetExcludedDevices(System.Collections.Generic.IEnumerable <DeviceDescriptor> excluded) { var excludeVector = new DeviceDescriptorVector(); foreach (var element in excluded) { excludeVector.Add(element); } _SetExcludedDevices(excludeVector); }
public static DeviceDescriptorVector Repeat(DeviceDescriptor value, int count) { global::System.IntPtr cPtr = CNTKLibPINVOKE.DeviceDescriptorVector_Repeat(DeviceDescriptor.getCPtr(value), count); DeviceDescriptorVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new DeviceDescriptorVector(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public DeviceDescriptorVector GetRange(int index, int count) { global::System.IntPtr cPtr = CNTKLibPINVOKE.DeviceDescriptorVector_GetRange(swigCPtr, index, count); DeviceDescriptorVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new DeviceDescriptorVector(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DeviceDescriptorVector obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }