Add one more bitsof overload to support Uint4096

This commit is contained in:
mratsim 2018-12-04 14:33:19 +01:00
parent eb9c650d25
commit fa37d957e9
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ template bitsof*(x: UintImpl[UintImpl[UintImpl[UintImpl[SomeInteger]]]]): untype
template bitsof*(x: UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[SomeInteger]]]]]): untyped = template bitsof*(x: UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[SomeInteger]]]]]): untyped =
2 * bitsof(x.lo) 2 * bitsof(x.lo)
template bitsof*(x: UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[SomeInteger]]]]]]): untyped = template bitsof*(x: UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[SomeInteger]]]]]]): untyped =
# Uint2048 - eth-bloom
2 * bitsof(x.lo)
template bitsof*(x: UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[UintImpl[SomeInteger]]]]]]]): untyped =
# Uint4096 - modExp in Nimbus
2 * bitsof(x.lo) 2 * bitsof(x.lo)
template applyHiLo*(a: UintImpl | IntImpl, c: untyped): untyped = template applyHiLo*(a: UintImpl | IntImpl, c: untyped): untyped =