isPow2

chisel3.util.isPow2
object isPow2

Returns whether a Scala integer is a power of two.

Attributes

Example
isPow2(1)  // returns true
isPow2(2)  // returns true
isPow2(3)  // returns false
isPow2(4)  // returns true
Source
Math.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
isPow2.type

Members list

Value members

Concrete methods

def apply(in: BigInt): Boolean

Attributes

Source
Math.scala
def apply(in: Int): Boolean

Attributes

Source
Math.scala