Example #1
0
 public DeviceDescriptorVector(DeviceDescriptorVector other) : this(CNTKLibPINVOKE.new_DeviceDescriptorVector__SWIG_1(DeviceDescriptorVector.getCPtr(other)), true)
 {
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #2
0
 public DeviceDescriptorVectorEnumerator(DeviceDescriptorVector collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
Example #3
0
 private static void _SetExcludedDevices(DeviceDescriptorVector excluded)
 {
     CNTKLibPINVOKE.DeviceDescriptor__SetExcludedDevices(DeviceDescriptorVector.getCPtr(excluded));
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #4
0
 public void SetRange(int index, DeviceDescriptorVector values)
 {
     CNTKLibPINVOKE.DeviceDescriptorVector_SetRange(swigCPtr, index, DeviceDescriptorVector.getCPtr(values));
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #5
0
        private static DeviceDescriptorVector _AllDevices()
        {
            DeviceDescriptorVector ret = new DeviceDescriptorVector(CNTKLibPINVOKE.DeviceDescriptor__AllDevices(), false);

            if (CNTKLibPINVOKE.SWIGPendingException.Pending)
            {
                throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Example #6
0
        /// <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);
        }
Example #7
0
        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);
        }
Example #8
0
        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);
        }
Example #9
0
 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);
 }