Class OpBehaviorPopcount


public class OpBehaviorPopcount extends UnaryOpBehavior
  • Constructor Details

    • OpBehaviorPopcount

      public OpBehaviorPopcount()
  • Method Details

    • evaluateUnary

      public long evaluateUnary(int sizeout, int sizein, long val)
      Description copied from class: UnaryOpBehavior
      Evaluate the unary operation using long data
      Specified by:
      evaluateUnary in class UnaryOpBehavior
      Parameters:
      sizeout - intended output size (bytes)
      sizein - in1 size (bytes)
      val - unsigned input 1
      Returns:
      operation result. NOTE: if the operation overflows bits may be set beyond the specified sizeout. Even though results should be treated as unsigned it may be returned as a signed long value. It is expected that the returned result always be properly truncated by the caller since the evaluation may not - this is done to conserve emulation cycles.
      See Also:
    • evaluateUnary

      public BigInteger evaluateUnary(int sizeout, int sizein, BigInteger unsignedIn1)
      Description copied from class: UnaryOpBehavior
      Evaluate the unary operation using BigInteger data
      Specified by:
      evaluateUnary in class UnaryOpBehavior
      Parameters:
      sizeout - intended output size (bytes)
      sizein - in1 size (bytes)
      unsignedIn1 - unsigned input 1
      Returns:
      operation result. NOTE: if the operation overflows bits may be set beyond the specified sizeout. Even though results should be treated as unsigned it may be returned as a signed value. It is expected that the returned result always be properly truncated by the caller since the evaluation may not - this is done to conserve emulation cycles.
      See Also: