Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 207 for nrand (0.04 sec)

  1. src/runtime/rand.go

    	unlock(&globalRand.lock)
    }
    
    // rand32 is uint32(rand()), called from compiler-generated code.
    //
    //go:nosplit
    func rand32() uint32 {
    	return uint32(rand())
    }
    
    // rand returns a random uint64 from the per-m chacha8 state.
    // Do not change signature: used via linkname from other packages.
    //
    //go:nosplit
    //go:linkname rand
    func rand() uint64 {
    	// Note: We avoid acquirem here so that in the fast path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 14:32:47 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. src/math/rand/v2/rand.go

    }
    
    // New returns a new Rand that uses random values from src
    // to generate other random values.
    func New(src Source) *Rand {
    	return &Rand{src: src}
    }
    
    // Int64 returns a non-negative pseudo-random 63-bit integer as an int64.
    func (r *Rand) Int64() int64 { return int64(r.src.Uint64() &^ (1 << 63)) }
    
    // Uint32 returns a pseudo-random 32-bit value as a uint32.
    func (r *Rand) Uint32() uint32 { return uint32(r.src.Uint64() >> 32) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:25:49 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  3. src/math/rand/rand.go

    	readPos int8
    }
    
    // New returns a new [Rand] that uses random values from src
    // to generate other random values.
    func New(src Source) *Rand {
    	s64, _ := src.(Source64)
    	return &Rand{src: src, s64: s64}
    }
    
    // Seed uses the provided seed value to initialize the generator to a deterministic state.
    // Seed should not be called concurrently with any other [Rand] method.
    func (r *Rand) 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)
  4. docs/debugging/inspect/main.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package main
    
    import (
    	"bufio"
    	crand "crypto/rand"
    	"crypto/rsa"
    	"crypto/x509"
    	"encoding/json"
    	"encoding/pem"
    	"errors"
    	"flag"
    	"fmt"
    	"io"
    	"os"
    	"strings"
    	"time"
    
    	"github.com/klauspost/filepathx"
    )
    
    var (
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 31 14:49:23 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. src/crypto/tls/handshake_messages_test.go

    		panic("rand.Read failed: " + err.Error())
    	}
    	return r
    }
    
    func randomString(n int, rand *rand.Rand) string {
    	b := randomBytes(n, rand)
    	return string(b)
    }
    
    func (*clientHelloMsg) Generate(rand *rand.Rand, size int) reflect.Value {
    	m := &clientHelloMsg{}
    	m.vers = uint16(rand.Intn(65536))
    	m.random = randomBytes(32, rand)
    	m.sessionId = randomBytes(rand.Intn(32), rand)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc

                rand_val = mlir::IntegerAttr::get(element_type, std::rand());
              } else if (element_type.isF16() || element_type.isF32() ||
                         element_type.isF64()) {
                rand_val = mlir::FloatAttr::get(element_type,
                                                std::rand() * 1.0 / RAND_MAX);
    
              } else {
                inst.emitWarning()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 11:51:44 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go

    	partLen := c.Rand.Intn(64) // len is [0, 63]
    	if !canBeEmpty {
    		partLen = c.Rand.Intn(63) + 1 // len is [1, 63]
    	}
    
    	runes := make([]rune, partLen)
    	if partLen == 0 {
    		return string(runes)
    	}
    
    	runes[0] = validStartEnd[c.Rand.Intn(len(validStartEnd))].choose(c.Rand)
    	for i := range runes[1:] {
    		runes[i+1] = validMiddle[c.Rand.Intn(len(validMiddle))].choose(c.Rand)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 03 15:12:26 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  8. src/crypto/ecdsa/ecdsa.go

    		return generateNISTEC(p224(), rand)
    	case elliptic.P256().Params():
    		return generateNISTEC(p256(), rand)
    	case elliptic.P384().Params():
    		return generateNISTEC(p384(), rand)
    	case elliptic.P521().Params():
    		return generateNISTEC(p521(), rand)
    	default:
    		return generateLegacy(c, rand)
    	}
    }
    
    func generateNISTEC[Point nistPoint[Point]](c *nistCurve[Point], rand io.Reader) (*PrivateKey, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  9. cmd/erasure-common.go

    package cmd
    
    import (
    	"context"
    	"fmt"
    	"io"
    	"math/rand"
    	"sync"
    	"time"
    
    	"github.com/minio/pkg/v3/sync/errgroup"
    )
    
    func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) {
    	disks := er.getDisks()
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	for _, i := range r.Perm(len(disks)) {
    		i := i
    		wg.Add(1)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. src/runtime/hash_test.go

    import (
    	"encoding/binary"
    	"fmt"
    	"internal/race"
    	"internal/testenv"
    	"math"
    	"math/rand"
    	"os"
    	. "runtime"
    	"slices"
    	"strings"
    	"testing"
    	"unsafe"
    )
    
    func TestMemHash32Equality(t *testing.T) {
    	if *UseAeshash {
    		t.Skip("skipping since AES hash implementation is used")
    	}
    	var b [4]byte
    	r := rand.New(rand.NewSource(1234))
    	seed := uintptr(r.Uint64())
    	for i := 0; i < 100; i++ {
    		randBytes(r, b[:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 17:50:18 UTC 2024
    - 18.4K bytes
    - Viewed (0)
Back to top