Exemple #1
0
 /// <summary>
 /// Collects signed division magic constants.
 /// </summary>
 /// <param name="multiplier">A constant factor to multiply by.</param>
 /// <param name="shiftAmount">An amount of bits to shift.</param>
 public SignedDivisionMagic(IntegerConstant multiplier, int shiftAmount)
 {
     this.Multiplier  = multiplier;
     this.ShiftAmount = shiftAmount;
 }
Exemple #2
0
 /// <summary>
 /// Collects unsigned division magic constants.
 /// </summary>
 /// <param name="multiplier">A constant factor to multiply by.</param>
 /// <param name="shiftAmount">An amount of bits to shift.</param>
 /// <param name="useAdd">A Boolean flag that tells if an addition should be used.</param>
 public UnsignedDivisionMagic(IntegerConstant multiplier, int shiftAmount, bool useAdd)
 {
     this.Multiplier  = multiplier;
     this.ShiftAmount = shiftAmount;
     this.UseAdd      = useAdd;
 }