- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for bitIsSet (0.16 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) -
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) -
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) -
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) -
src/cmd/compile/internal/inline/inlheur/scoreadjusttyp_string.go
// Code generated by "stringer -bitset -type scoreAdjustTyp"; DO NOT EDIT. package inlheur import "strconv" import "bytes" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[panicPathAdj-1] _ = x[initFuncAdj-2] _ = x[inLoopAdj-4] _ = x[passConstToIfAdj-8] _ = x[passConstToNestedIfAdj-16]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 07 21:13:01 UTC 2023 - 2.6K bytes - Viewed (0) -
src/cmd/compile/internal/inline/inlheur/cspropbits_string.go
// Code generated by "stringer -bitset -type CSPropBits"; DO NOT EDIT. package inlheur import "strconv" import "bytes" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[CallSiteInLoop-1] _ = x[CallSiteOnPanicPath-2] _ = x[CallSiteInInitFunc-4] } var _CSPropBits_value = [...]uint64{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 23:03:03 UTC 2023 - 1.2K bytes - Viewed (0) -
pkg/ledger/smt_test.go
t.Fatal("leaf shortcut didn't move up to root") } key1 := make([]byte, 8) // set the last bit bitSet(key1, 63) keys := [][]byte{key0, key1} values = [][]byte{defaultLeaf, getFreshData(1)[0]} _, err := smt.Update(keys, values) assert.NoError(t, err) } func bitSet(bits []byte, i int) { bits[i/8] |= 1 << uint(7-i%8) } func TestSmtRaisesError(t *testing.T) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 08 16:43:05 UTC 2023 - 7.9K bytes - Viewed (0)