Beispiel #1
0
        public void IterateRangeBatch(int index, T[] external, int externalOffset, int count, IterateOperatorBatch <T> op)
        {
            if ((count < 0) || (index < 0) || (externalOffset < 0))
            {
                throw new ArgumentOutOfRangeException();
            }
            if (unchecked ((uint)index + (uint)count > (uint)this.Count))
            {
                throw new ArgumentException();
            }
            if (external != null)
            {
                if (unchecked ((uint)externalOffset + (uint)count > (uint)external.Length))
                {
                    throw new ArgumentException();
                }
            }

            T[] data = inner.ToArray();
            op(data, 0, external, 0, data.Length);
            inner.Clear();
            inner.AddRange(data);
        }
Beispiel #2
0
 public void IterateRangeBatch(int index, T[] external, int externalOffset, int count, IterateOperatorBatch <T> op)
 {
     inner.IterateRangeBatch(
         IntLong.ToLong(index),
         external,
         IntLong.ToLong(externalOffset),
         IntLong.ToLong(count),
         delegate(T[] v, long vOffset, T[] x, long xOffset, long count2)
     {
         op(v, IntLong.ToInt(vOffset), x, IntLong.ToInt(xOffset), IntLong.ToInt(count2));
     });
 }