Function tvm::prim::IsPowerOfTwoInt

Function tvm::prim::IsPowerOfTwoInt#

Function Documentation#

bool tvm::prim::IsPowerOfTwoInt(const PrimExpr &x, int *shift)#

Check whether x is a constant power of two If x is power of two, write the power to the shift.

Parameters:
  • x – The input expression.

  • shift – The output shift if x is power of two.

Returns:

whether x is constant power of two