Esempio n. 1
0
        public static void AddXYTran(float a, AlignedArray x, int[] rgposY, AlignedArray valuesY,
                                     int posMinY, int iposMinY, int iposLimY, AlignedArray mat, int crow)
        {
            Contracts.Assert(Compat(x));
            Contracts.Assert(Compat(valuesY));
            Contracts.Assert(Compat(mat));
            Contracts.AssertNonEmpty(rgposY);
            Contracts.Assert(0 <= iposMinY && iposMinY <= iposLimY && iposLimY <= rgposY.Length);
            Contracts.Assert(0 < crow && crow <= x.Size);
            Contracts.Assert(x.Size * valuesY.Size == mat.Size);

            if (iposMinY >= iposLimY)
            {
                return;
            }

            unsafe
            {
                fixed(float *px = &x.Items[0])
                fixed(float *py   = &valuesY.Items[0])
                fixed(int *pposy  = &rgposY[0])
                fixed(float *pmat = &mat.Items[0])
                {
                    Thunk.AddXYTranPX(a, Ptr(x, px), pposy, Ptr(valuesY, py), posMinY, iposMinY, iposLimY, Ptr(mat, pmat),
                                      crow, valuesY.Size);
                }
            }
        }