Ejemplo n.º 1
0
        public void RunStructLclFldScenario()
        {
            var test   = TestStruct.Create();
            var result = Bmi1.ResetLowestSetBit(test._fld);

            ValidateResult(test._fld, result);
        }
Ejemplo n.º 2
0
        public void RunClassLclFldScenario()
        {
            var test   = new ScalarUnaryOpTest__ResetLowestSetBitUInt32();
            var result = Bmi1.ResetLowestSetBit(test._fld);

            ValidateResult(test._fld, result);
        }
Ejemplo n.º 3
0
        public void RunLclVarScenario_UnsafeRead()
        {
            var data   = Unsafe.ReadUnaligned <UInt32>(ref Unsafe.As <UInt32, byte>(ref _data));
            var result = Bmi1.ResetLowestSetBit(data);

            ValidateResult(data, result);
        }
Ejemplo n.º 4
0
        public void RunClsVarScenario()
        {
            var result = Bmi1.ResetLowestSetBit(
                _clsVar
                );

            ValidateResult(_clsVar, result);
        }
        public void RunClassFldScenario()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));

            var result = Bmi1.ResetLowestSetBit(_fld);

            ValidateResult(_fld, result);
        }
Ejemplo n.º 6
0
        public void RunBasicScenario_UnsafeRead()
        {
            var result = Bmi1.ResetLowestSetBit(
                Unsafe.ReadUnaligned <UInt64>(ref Unsafe.As <UInt64, byte>(ref _data))
                );

            ValidateResult(_data, result);
        }
        public void RunStructLclFldScenario()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));

            var test   = TestStruct.Create();
            var result = Bmi1.ResetLowestSetBit(test._fld);

            ValidateResult(test._fld, result);
        }
        public void RunClassLclFldScenario()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));

            var test   = new ScalarUnaryOpTest__ResetLowestSetBitUInt32();
            var result = Bmi1.ResetLowestSetBit(test._fld);

            ValidateResult(test._fld, result);
        }
        public void RunLclVarScenario_UnsafeRead()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));

            var data   = Unsafe.ReadUnaligned <UInt32>(ref Unsafe.As <UInt32, byte>(ref _data));
            var result = Bmi1.ResetLowestSetBit(data);

            ValidateResult(data, result);
        }
        public void RunBasicScenario_UnsafeRead()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));

            var result = Bmi1.ResetLowestSetBit(
                Unsafe.ReadUnaligned <UInt64>(ref Unsafe.As <UInt64, byte>(ref _data))
                );

            ValidateResult(_data, result);
        }
Ejemplo n.º 11
0
        public override ulong Run(CancellationToken cancellationToken)
        {
            if (!Bmi1.IsSupported)
            {
                return(0uL);
            }

            var iterations = 0uL;
            var rlsb       = randomInt;

            while (!cancellationToken.IsCancellationRequested)
            {
                for (var i = 0; i < LENGTH; i++)
                {
                    rlsb = Bmi1.ResetLowestSetBit(rlsb);
                }

                iterations++;
            }

            return(iterations + rlsb - rlsb);
        }
Ejemplo n.º 12
0
            public void RunStructFldScenario(ScalarUnaryOpTest__ResetLowestSetBitUInt32 testClass)
            {
                var result = Bmi1.ResetLowestSetBit(_fld);

                testClass.ValidateResult(_fld, result);
            }
Ejemplo n.º 13
0
        public void RunClassFldScenario()
        {
            var result = Bmi1.ResetLowestSetBit(_fld);

            ValidateResult(_fld, result);
        }