Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Int63 (0.2 sec)

  1. internal/dsync/locked_rand.go

    type lockedRandSource struct {
    	lk  sync.Mutex
    	src rand.Source
    }
    
    // Int63 returns a non-negative pseudo-random 63-bit integer as an int64.
    func (r *lockedRandSource) Int63() (n int64) {
    	r.lk.Lock()
    	n = r.src.Int63()
    	r.lk.Unlock()
    	return
    }
    
    // Seed uses the provided seed value to initialize the generator to a
    // deterministic state.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Oct 18 15:39:59 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  2. api/go1.8.txt

    pkg math/big, method (*Int) Sqrt(*Int) *Int
    pkg math/rand, func Uint64() uint64
    pkg math/rand, method (*Rand) Uint64() uint64
    pkg math/rand, type Source64 interface, Int63() int64
    pkg math/rand, type Source64 interface { Int63, Seed, Uint64 }
    pkg math/rand, type Source64 interface, Seed(int64)
    pkg math/rand, type Source64 interface, Uint64() uint64
    pkg net/http, const TrailerPrefix ideal-string
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Dec 21 05:25:57 GMT 2016
    - 16.3K bytes
    - Viewed (0)
  3. cmd/test-utils_test.go

    var src = rand.NewSource(time.Now().UnixNano())
    
    func randString(n int) string {
    	b := make([]byte, n)
    	// A src.Int63() generates 63 random bits, enough for letterIdxMax characters!
    	for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; {
    		if remain == 0 {
    			cache, remain = src.Int63(), letterIdxMax
    		}
    		if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
    			b[i] = letterBytes[idx]
    			i--
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 75.7K bytes
    - Viewed (0)
  4. cmd/object-api-utils.go

    	// 4 MB block.
    	// Approx runtime ~30ms
    	data := make([]byte, 4<<20)
    	rng := rand.New(rand.NewSource(0))
    	for i := range data {
    		// Generate compressible stream...
    		data[i] = byte(rng.Int63() & 3)
    	}
    	failOnErr := func(err error) {
    		if err != nil {
    			logger.Fatal(errSelfTestFailure, "compress: error on self-test: %v", err)
    		}
    	}
    	const skip = 2<<20 + 511
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  5. doc/go1.22.html

    <li>Many methods now use faster algorithms that were not possible to adopt in <code>math/rand</code>
    because they changed the output streams.
    
    <li>The
    <code>Intn</code>,
    <code>Int31</code>,
    <code>Int31n</code>,
    <code>Int63</code>,
    and
    <code>Int64n</code>
    top-level functions and methods from <code>math/rand</code>
    are spelled more idiomatically in <code>math/rand/v2</code>:
    <code>IntN</code>,
    <code>Int32</code>,
    HTML
    - Registered: Tue Feb 06 11:13:10 GMT 2024
    - Last Modified: Wed Jan 31 20:51:56 GMT 2024
    - 45.6K bytes
    - Viewed (0)
  6. api/go1.txt

    pkg math/rand, method (*Rand) Uint32() uint32
    pkg math/rand, method (*Zipf) Uint64() uint64
    pkg math/rand, type Rand struct
    pkg math/rand, type Source interface { Int63, Seed }
    pkg math/rand, type Source interface, Int63() int64
    pkg math/rand, type Source interface, Seed(int64)
    pkg math/rand, type Zipf struct
    pkg mime, func AddExtensionType(string, string) error
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top