Example #1
0
 public void SetRange(int index, CharVector values)
 {
     CNTKLibPINVOKE.CharVector_SetRange(swigCPtr, index, CharVector.getCPtr(values));
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #2
0
    public static byte[] get_vector(CharVector src, bool own)
    {
        IntPtr ptr = modshogunPINVOKE.CharVector_get_vector__SWIG_0(CharVector.getCPtr(src), own);

        if (modshogunPINVOKE.SWIGPendingException.Pending)
        {
            throw modshogunPINVOKE.SWIGPendingException.Retrieve();
        }
        int[] size = new int[1];
        Marshal.Copy(ptr, size, 0, 1);

        int len = size[0];

        byte[] ret = new byte[len];

        Marshal.Copy(new IntPtr(ptr.ToInt64() + Marshal.SizeOf(typeof(int))), ret, 0, len);
        return(ret);
    }
Example #3
0
 public CharVector(CharVector other) : this(CNTKLibPINVOKE.new_CharVector__SWIG_1(CharVector.getCPtr(other)), true)
 {
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #4
0
 public CharVector(CharVector orig) : this(modshogunPINVOKE.new_CharVector__SWIG_5(CharVector.getCPtr(orig)), true)
 {
     if (modshogunPINVOKE.SWIGPendingException.Pending)
     {
         throw modshogunPINVOKE.SWIGPendingException.Retrieve();
     }
 }