Esempio n. 1
0
        public void FillIncrementing()
        {
            // arrange
            const int BufferSize = 10;
            var       data       = new int[BufferSize];
            var       target     = new DataAndLayout <int>(data, new FastAccess(new Layout(new int[] { BufferSize }, 0, new int[] { 1 })));

            // action
            ScalarOps.FillIncrementing(0, 2, target);

            // assert
            var expecedData = Enumerable.Range(0, BufferSize).Select(n => n * 2).ToArray();

            Assert.IsTrue(Enumerable.SequenceEqual(expecedData, data));
        }