Exemplo n.º 1
0
        public unsafe void TestVectorized(IntGenerator generator)
        {
            var(data, stepSize, reproContext) = generator();

            fixed(int *dataPtr = &data[0])
            {
                var numNegs = CountNegatives.CountNegativesVectorized(dataPtr, data.Length);

                Assert.That(numNegs, Is.EqualTo(data.Count(i => i < 0)), reproContext);
                Console.WriteLine(numNegs);
            }
        }
 public unsafe void Vectorized() => CountNegatives.CountNegativesVectorized(_arrayPtrs[_iterationIndex++], N);