change an Aristo function name to avoid Nim stdlib ambiguity (#2240)

This commit is contained in:
tersec 2024-05-29 15:08:00 +00:00 committed by GitHub
parent eaf3d9897e
commit c466edfd8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -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*(

View File

@ -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

View File

@ -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()