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

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

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