BitVector is the fundamental data type for binary code, which is essentially a bit vector. We want the size of a bit vector to be less than or equal to 64 bits because bigint operation is slow, and most arithmetics on modern architectures are in 64 bits any ways. For example, SIMD operations can also be divided into a set of 64-bit operations. N.B. Num becomes zero when the Length becomes greater than 64. We intentionally do not sync Num and BigNum.
Instance member | Description |
|
|
|
|
|
|
|
|
|
|
|
BitVector approximate equal. For high-precision floating point numbers, this function performs approximate equality check.
|
Full Usage:
this.BigValue()
Returns: bigint
Modifiers: abstract |
|
|
Type-cast a BitVector to another type. If the target type is bigger than the current type, then this works the same as ZExt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
this.IsNegative()
Returns: bool
Modifiers: abstract |
|
Full Usage:
this.IsOne()
Returns: bool
Modifiers: abstract |
|
Full Usage:
this.IsPositive()
Returns: bool
Modifiers: abstract |
|
Full Usage:
this.IsZero()
Returns: bool
Modifiers: abstract |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
this.SmallValue()
Returns: uint64
Modifiers: abstract |
|
|
|
|
|
Full Usage:
this.ValToString()
Returns: string
Modifiers: abstract |
|
|
|
|
|
|
|
Static member | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BitVector.ofBInt i typ
Parameters:
bigint
typ : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Get a BitVector from a bigint. We assume that the given RegType (typ) is big enough to hold the given bigint. Otherwise, the resulting BitVector may contain an unexpected value.
|
Full Usage:
BitVector.ofInt32 i typ
Parameters:
int32
typ : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector.ofInt64 i typ
Parameters:
int64
typ : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector.ofUInt32 i typ
Parameters:
uint32
typ : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector.ofUInt64 i typ
Parameters:
uint64
typ : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BitVector.signedMax rt
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector.signedMin rt
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BitVector.unsignedMax rt
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector.unsignedMin rt
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
|
|
|
|
|
|