- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for seedPos (0.13 sec)
-
src/math/rand/rand.go
func (r *lockedSource) Seed(seed int64) { r.lk.Lock() r.seed(seed) r.lk.Unlock() } // seedPos implements Seed for a lockedSource without a race condition. func (r *lockedSource) seedPos(seed int64, readPos *int8) { r.lk.Lock() r.seed(seed) *readPos = 0 r.lk.Unlock() } // seed seeds the underlying source. // The caller must have locked r.lk. func (r *lockedSource) seed(seed int64) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:09:08 UTC 2024 - 16.9K bytes - Viewed (0) -
src/hash/maphash/maphash.go
package maphash // A Seed is a random value that selects the specific hash function // computed by a [Hash]. If two Hashes use the same Seeds, they // will compute the same hash values for any given input. // If two Hashes use different Seeds, they are very likely to compute // distinct hash values for any given input. // // A Seed must be initialized by calling [MakeSeed].
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 19:15:34 UTC 2023 - 7.9K bytes - Viewed (0) -
src/go/doc/testdata/examples/issue43658.golden
// Since this is a randomized algorithm we use a defined random source to ensure // consistency between test runs. In practice, results will not differ greatly // between runs with different PRNG seeds. src := rand.NewSource(1) // Create dumbell graph: // // 0 4 // |\ /| // | 2 - 3 | // |/ \| // 1 5 // g := simple.NewUndirectedGraph()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 23:13:45 UTC 2022 - 4.5K bytes - Viewed (0) -
pilot/pkg/xds/cds_test.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 01 02:06:39 UTC 2024 - 9.2K bytes - Viewed (0) -
src/internal/chacha8rand/chacha8.go
s.i = i + 1 return s.buf[i&31], true // i&31 eliminates bounds check } // Init seeds the State with the given seed value. func (s *State) Init(seed [32]byte) { s.Init64([4]uint64{ byteorder.LeUint64(seed[0*8:]), byteorder.LeUint64(seed[1*8:]), byteorder.LeUint64(seed[2*8:]), byteorder.LeUint64(seed[3*8:]), }) } // Init64 seeds the state with the given seed value. func (s *State) Init64(seed [4]uint64) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:47:29 UTC 2024 - 4.4K bytes - Viewed (0) -
src/go/doc/testdata/examples/issue43658.go
// Since this is a randomized algorithm we use a defined random source to ensure // consistency between test runs. In practice, results will not differ greatly // between runs with different PRNG seeds. src := rand.NewSource(1) // Create dumbell graph: // // 0 4 // |\ /| // | 2 - 3 | // |/ \| // 1 5 // g := simple.NewUndirectedGraph()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 23:13:45 UTC 2022 - 6.6K bytes - Viewed (0) -
src/crypto/rand/rand_plan9.go
"crypto/aes" "internal/byteorder" "io" "os" "sync" "time" ) const randomDevice = "/dev/random" func init() { Reader = &reader{} } // reader is a new pseudorandom generator that seeds itself by // reading from /dev/random. The Read method on the returned // reader always returns the full amount asked for, or else it // returns an error. The generator is a fast key erasure RNG. type reader struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 1.8K bytes - Viewed (0) -
src/crypto/ed25519/ed25519.go
PrivateKeySize = 64 // SignatureSize is the size, in bytes, of signatures generated and verified by this package. SignatureSize = 64 // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032. SeedSize = 32 ) // PublicKey is the type of Ed25519 public keys. type PublicKey []byte
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 11.7K bytes - Viewed (0) -
src/go/doc/comment/wrap_test.go
package comment import ( "flag" "fmt" "math/rand" "testing" "time" "unicode/utf8" ) var wrapSeed = flag.Int64("wrapseed", 0, "use `seed` for wrap test (default auto-seeds)") func TestWrap(t *testing.T) { if *wrapSeed == 0 { *wrapSeed = time.Now().UnixNano() } t.Logf("-wrapseed=%#x\n", *wrapSeed) r := rand.New(rand.NewSource(*wrapSeed))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:31:45 UTC 2022 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/rand/rand.go
// By design this should panic if input is invalid, <= 0. func Int63nRange(min, max int64) int64 { rng.Lock() defer rng.Unlock() return rng.rand.Int63n(max-min) + min } // Seed seeds the rng with the provided seed. func Seed(seed int64) { rng.Lock() defer rng.Unlock() rng.rand = rand.New(rand.NewSource(seed)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 11 11:02:01 UTC 2018 - 3.5K bytes - Viewed (0)