Ejemplo n.º 1
0
        public void Fill()
        {
            // arrange
            var vectorCount = Vector <int> .Count;

            // Itentionally break the alignment for the Vector operation to test more code.
            var bufferSize = 10 + (vectorCount / 2);
            var data       = new int[bufferSize];
            var target     = new DataAndLayout <int>(data, new FastAccess(new Layout(new int[] { bufferSize }, 0, new int[] { 1 })));

            const int FillPattern = 999;

            // action
            VectorOps.Fill(FillPattern, target);

            // assert
            Assert.IsTrue(data.All(d => d == FillPattern));
        }