- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 42 for bitIsSet (0.11 sec)
-
pkg/ledger/smt_tools.go
if err != nil { return nil, err } if isShortcut { if bytes.Equal(lnode[:hashLength], key) { return rnode[:hashLength], nil } return nil, nil } if bitIsSet(key, s.trieHeight-height) { // visit right node return s.get(rnode, key, batch, 2*iBatch+2, height-1) } // visit left node return s.get(lnode, key, batch, 2*iBatch+1, height-1) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 1.9K bytes - Viewed (0) -
pkg/ledger/util.go
"github.com/spaolacci/murmur3" ) // defaultLeaf is the Trie default value : hash of 0x0 var defaultLeaf = hasher([]byte{0x0}) const ( hashLength = 8 ) type hash [hashLength]byte func bitIsSet(bits []byte, i int) bool { return bits[i/8]&(1<<uint(7-i%8)) != 0 } func hasher(data ...[]byte) []byte { hasher := murmur3.New64() for i := 0; i < len(data); i++ { _, _ = hasher.Write(data[i]) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 1.3K bytes - Viewed (0) -
pkg/ledger/smt.go
} // splitKeys divides the array of keys into 2 so they can update left and right branches in parallel func (s *smt) splitKeys(keys [][]byte, height int) ([][]byte, [][]byte) { for i, key := range keys { if bitIsSet(key, height) { return keys[:i], keys[i:] } } return keys, nil } // maybeAddShortcutToKV adds a shortcut key to the keys array to be updated.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 08 16:43:05 UTC 2023 - 14K bytes - Viewed (0) -
src/cmd/compile/internal/ir/bitset.go
cuiweixie <******@****.***> 1664452800 +0800
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 29 22:03:56 UTC 2022 - 734 bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/collections/ImmutableFilteredList.java
* to keep track of which items are filtered out of the source list. */ public class ImmutableFilteredList<T> extends AbstractList<T> { private final List<T> source; private final BitSet filter; private ImmutableFilteredList(List<T> source, BitSet filter) { this.source = source; this.filter = filter; } /** * Creates an {@code ImmutableFilteredList} which contains all the elements of {@code source}.
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 3.5K bytes - Viewed (0) -
platforms/software/dependency-management/src/main/java/org/gradle/internal/component/model/MultipleCandidateMatcher.java
// Because they are EXTRA attributes, we consider that a // candidate which does NOT provide this value is a better match int candidateCount = candidateAttributeSets.length; BitSet any = new BitSet(candidateCount); for (int c = 0; c < candidateCount; c++) { ImmutableAttributes candidateAttributeSet = candidateAttributeSets[c];
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Oct 10 21:10:11 UTC 2023 - 19.4K bytes - Viewed (0) -
guava/src/com/google/common/base/CharMatcher.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Feb 09 15:49:48 UTC 2024 - 53.8K bytes - Viewed (0) -
pkg/kubelet/cm/topologymanager/bitmask/bitmask_test.go
func TestRemove(t *testing.T) { tcases := []struct { name string bitsSet []int bitsRemove []int expectedMask string }{ { name: "Set bit 0. Remove bit 0", bitsSet: []int{0}, bitsRemove: []int{0}, expectedMask: "00", }, { name: "Set bits 0 and 1. Remove bit 1", bitsSet: []int{0, 1}, bitsRemove: []int{1}, expectedMask: "01", },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 09:45:09 UTC 2022 - 16.2K bytes - Viewed (0) -
android/guava/src/com/google/common/base/SmallCharMatcher.java
package com.google.common.base; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.CharMatcher.NamedFastMatcher; import java.util.BitSet; /** * An immutable version of CharMatcher for smallish sets of characters that uses a hash table with * linear probing to check for matches. * * @author Christopher Swenson */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Feb 09 15:49:48 UTC 2024 - 4.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/CharMatcher.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Feb 09 15:49:48 UTC 2024 - 53.7K bytes - Viewed (0)