Esempio n. 1
0
        private static uint Multiply(DelegateDispatchedUInt32Divisor divisor, uint value)
        {
            ulong rax = value;
            uint  eax;
            ulong multiplier = divisor.Multiplier;
            int   shift      = divisor.Shift;

            rax *= multiplier;
            eax  = (uint)(rax >> shift);
            return(eax);
        }
Esempio n. 2
0
        private static uint MultiplyAdd(DelegateDispatchedUInt32Divisor divisor, uint value)
        {
            ulong rax = value;
            uint  eax;
            ulong multiplier = divisor.Multiplier;
            int   shift      = divisor.Shift;

            rax    *= multiplier;
            eax     = (uint)(rax >> 32);
            value  -= eax;
            value >>= 1;
            eax    += value;
            eax   >>= shift;
            return(eax);
        }
Esempio n. 3
0
#pragma warning restore S1172   // Unused method parameters should be removed
#pragma warning restore IDE0060 // 未使用のパラメーターを削除します

        private static uint ShiftOnly(DelegateDispatchedUInt32Divisor divisor, uint value) => value >> divisor.Shift;
Esempio n. 4
0
#pragma warning disable IDE0060 // 未使用のパラメーターを削除します
#pragma warning disable S1172   // Unused method parameters should be removed

        private static uint Echo(DelegateDispatchedUInt32Divisor divisor, uint value) => value;