예제 #1
0
        public static void AddXYTran(float a, AlignedArray x, AlignedArray y, AlignedArray mat, float momentum, AlignedArray delta, int crow)
        {
            Contracts.Assert(Compat(x));
            Contracts.Assert(Compat(y));
            Contracts.Assert(Compat(mat));
            Contracts.Assert(Compat(delta));
            Contracts.Assert(0 < crow && crow <= x.Size);
            Contracts.Assert(x.Size * y.Size == mat.Size);
            Contracts.Assert(mat.Size == delta.Size);

            unsafe
            {
                fixed(float *px = &x.Items[0])
                fixed(float *py   = &y.Items[0])
                fixed(float *pmat = &mat.Items[0])
                fixed(float *pdel = &delta.Items[0])
                Thunk.AddXYTranMomX(a, Ptr(x, px), Ptr(y, py), Ptr(mat, pmat), momentum, Ptr(delta, pdel), crow, y.Size);
            }
        }