Skip to content

Commit

Permalink
Make PartialTileSize private
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutchinson committed Jul 10, 2024
1 parent 79157c6 commit 0a2351d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/layout/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
// The logSize is required so that a partial qualifier can be appended to tiles that
// would contain fewer than 256 entries.
func EntriesPathForLogIndex(seq, logSize uint64) string {
p := PartialTileSize(0, seq, logSize)
p := partialTileSize(0, seq, logSize)
return EntriesPath(seq/256, p)
}

Expand All @@ -49,7 +49,7 @@ func EntriesPath(n, p uint64) string {
// TilePath builds the path to the subtree tile with the given level and index in tile space.
func TilePath(tileLevel, tileIndex, logSize uint64) string {
suffix := ""
p := PartialTileSize(tileLevel, tileIndex, logSize)
p := partialTileSize(tileLevel, tileIndex, logSize)
if p > 0 {
suffix = fmt.Sprintf(".p/%d", p)
}
Expand Down
4 changes: 2 additions & 2 deletions api/layout/tile.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

package layout

// PartialTileSize returns the expected number of leaves in a tile at the given location within
// partialTileSize returns the expected number of leaves in a tile at the given location within
// a tree of the specified logSize, or 0 if the tile is expected to be fully populated.
func PartialTileSize(level, index, logSize uint64) uint64 {
func partialTileSize(level, index, logSize uint64) uint64 {
sizeAtLevel := logSize >> (level * 8)
fullTiles := sizeAtLevel / 256
if index < fullTiles {
Expand Down

0 comments on commit 0a2351d

Please sign in to comment.