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); }
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); }
#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;
#pragma warning disable IDE0060 // 未使用のパラメーターを削除します #pragma warning disable S1172 // Unused method parameters should be removed private static uint Echo(DelegateDispatchedUInt32Divisor divisor, uint value) => value;