public static void AddXYTran(AlignedArray x, AlignedArray y, AlignedArray mat, AlignedArray accGrads, AlignedArray accUpdates, float decay, float cond, int crow) { Contracts.Assert(Compat(x)); Contracts.Assert(Compat(y)); Contracts.Assert(Compat(mat)); Contracts.Assert(Compat(accGrads)); Contracts.Assert(Compat(accUpdates)); Contracts.Assert(0 < crow && crow <= x.Size); Contracts.Assert(x.Size * y.Size == mat.Size); Contracts.Assert(mat.Size == accGrads.Size); Contracts.Assert(mat.Size == accUpdates.Size); unsafe { fixed(float *px = &x.Items[0]) fixed(float *py = &y.Items[0]) fixed(float *pmat = &mat.Items[0]) fixed(float *pag = &accGrads.Items[0]) fixed(float *pau = &accUpdates.Items[0]) Thunk.AddXYTranGradX(Ptr(x, px), Ptr(y, py), Ptr(mat, pmat), Ptr(accGrads, pag), Ptr(accUpdates, pau), decay, cond, crow, y.Size); } }