shardwidth

package
v0.22.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Overview

Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const Exponent = 20

Exponent controls the size of each shard

# Warnings - changing this value WILL corrupt any data sets created with a different value - both server and client must be compiled with the same Exponent

View Source
const ShardWidth = 1 << Exponent

ShardWidth is the number of column IDs in a shard. It must be a power of 2 greater than or equal to 16. shardWidthExponent = 20 // set in shardwidthNN.go files

Variables

This section is empty.

Functions

func FindNextShard

func FindNextShard(i int, haystack []uint64) int

FindNextShard returns the index of the first item which is not in the same shard as i. The index it returns may be equal to the length of the haystack, indicatincg that the rest of the list is in the same shard.

func FindShards

func FindShards(haystack []uint64) (shards []uint64, endIndexes []int)

FindShards finds the shards in a given haystack

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL