mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 21:34:33 +00:00
change an Aristo function name to avoid Nim stdlib ambiguity (#2240)
This commit is contained in:
parent
eaf3d9897e
commit
c466edfd8d
@ -242,7 +242,7 @@ func fifoDel(
|
|||||||
# Delete all available
|
# Delete all available
|
||||||
return (@[(QueueID(1), fifo[1]), (fifo[0], wrap)], ZeroQidPair)
|
return (@[(QueueID(1), fifo[1]), (fifo[0], wrap)], ZeroQidPair)
|
||||||
|
|
||||||
func capacity(
|
func volumeSize(
|
||||||
ctx: openArray[tuple[size, width: int]]; # Schedule layout
|
ctx: openArray[tuple[size, width: int]]; # Schedule layout
|
||||||
): tuple[maxQueue: int, minCovered: int, maxCovered: int] =
|
): tuple[maxQueue: int, minCovered: int, maxCovered: int] =
|
||||||
## Number of maximally stored and covered queued entries for the argument
|
## Number of maximally stored and covered queued entries for the argument
|
||||||
@ -262,20 +262,20 @@ func capacity(
|
|||||||
# Public functions
|
# Public functions
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
func capacity*(
|
func volumeSize*(
|
||||||
ctx: openArray[tuple[size, width, wrap: int]]; # Schedule layout
|
ctx: openArray[tuple[size, width, wrap: int]]; # Schedule layout
|
||||||
): tuple[maxQueue: int, minCovered: int, maxCovered: int] =
|
): tuple[maxQueue: int, minCovered: int, maxCovered: int] =
|
||||||
## Variant of `capacity()`.
|
## Variant of `volumeSize()`.
|
||||||
ctx.toSeq.mapIt((it[0],it[1])).capacity
|
ctx.toSeq.mapIt((it[0],it[1])).volumeSize
|
||||||
|
|
||||||
func capacity*(
|
func volumeSize*(
|
||||||
journal: QidSchedRef; # Cascaded fifos descriptor
|
journal: QidSchedRef; # Cascaded fifos descriptor
|
||||||
): tuple[maxQueue: int, minCovered: int, maxCovered: int] =
|
): tuple[maxQueue: int, minCovered: int, maxCovered: int] =
|
||||||
## Number of maximally stored and covered queued entries for the layout of
|
## Number of maximally stored and covered queued entries for the layout of
|
||||||
## argument `journal`. The resulting value of `maxQueue` entry is the maximal
|
## argument `journal`. The resulting value of `maxQueue` entry is the maximal
|
||||||
## number of database slots needed, the `minCovered` and `maxCovered` entry
|
## number of database slots needed, the `minCovered` and `maxCovered` entry
|
||||||
## indicate the rancge of the backlog foa a fully populated database.
|
## indicate the rancge of the backlog foa a fully populated database.
|
||||||
journal.ctx.q.toSeq.mapIt((it[0].int,it[1].int)).capacity()
|
journal.ctx.q.toSeq.mapIt((it[0].int,it[1].int)).volumeSize()
|
||||||
|
|
||||||
|
|
||||||
func addItem*(
|
func addItem*(
|
||||||
|
@ -36,7 +36,7 @@ const
|
|||||||
[(2,0,high int),(1,1,high int),(1,1,high int),(1,1,high int)],
|
[(2,0,high int),(1,1,high int),(1,1,high int),(1,1,high int)],
|
||||||
]
|
]
|
||||||
|
|
||||||
LyoSamples* = samples.mapIt((it, (3 * it.capacity.minCovered) div 2))
|
LyoSamples* = samples.mapIt((it, (3 * it.volumeSize.minCovered) div 2))
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Private helpers
|
# Private helpers
|
||||||
|
@ -390,7 +390,7 @@ proc testQidScheduler*(
|
|||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
noisy.say "***", "sampleSize=", sampleSize,
|
noisy.say "***", "sampleSize=", sampleSize,
|
||||||
" ctx=", ctx, " stats=", scd.capacity()
|
" ctx=", ctx, " stats=", scd.volumeSize()
|
||||||
|
|
||||||
for n in 1 .. sampleSize:
|
for n in 1 .. sampleSize:
|
||||||
let w = scd.addItem()
|
let w = scd.addItem()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user