- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for shuffled (0.16 sec)
-
cmd/erasure-metadata-utils.go
return shuffledPartsMetadata } // shuffleDisks - shuffle input disks slice depending on the // erasure distribution. Return shuffled slice of disks with // their expected distribution. func shuffleDisks(disks []StorageAPI, distribution []int) (shuffledDisks []StorageAPI) { if distribution == nil { return disks } shuffledDisks = make([]StorageAPI, len(disks)) // Shuffle disks for expected distribution.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 11.7K bytes - Viewed (0) -
src/cmd/internal/obj/sym.go
// symbols reliably. Sort by name but use a stable sort, so that // any original entries with the same name (all DWARFVAR symbols // have empty names but different relocation sets) are not shuffled. // TODO: Find a better place and optimize to only sort TOC symbols. sort.SliceStable(ctxt.Data, func(i, j int) bool { return ctxt.Data[i].Name < ctxt.Data[j].Name }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 14:41:10 UTC 2024 - 14.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc
return no_op(); // For vectors, shuffle values by sorting instead of the obvious // Fisher-Yates algorithm. Fisher-Yates is simple to implement and correct, // but not easily parallelizable. For a sufficiently parallel architecture, // it is faster to sort many times, than Fisher-Yates shuffle once. if (input_rank == 1) { // Shuffle values by assigning each value a random key and sorting the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 291.8K bytes - Viewed (0) -
src/testing/fstest/testfs_test.go
t.Fatal(err) } } func TestDash(t *testing.T) { m := MapFS{ "a-b/a": {Data: []byte("a-b/a")}, } if err := TestFS(m, "a-b/a"); err != nil { t.Error(err) } } type shuffledFS MapFS func (fsys shuffledFS) Open(name string) (fs.File, error) { f, err := MapFS(fsys).Open(name) if err != nil { return nil, err } return &shuffledFile{File: f}, nil } type shuffledFile struct{ fs.File }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 2.9K bytes - Viewed (0) -
src/math/rand/v2/rand.go
for i := range p { p[i] = i } r.Shuffle(len(p), func(i, j int) { p[i], p[j] = p[j], p[i] }) return p } // Shuffle pseudo-randomizes the order of elements. // n is the number of elements. Shuffle panics if n < 0. // swap swaps the elements with indexes i and j. func (r *Rand) Shuffle(n int, swap func(i, j int)) { if n < 0 { panic("invalid argument to Shuffle") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 02:25:49 UTC 2024 - 12.8K bytes - Viewed (0) -
src/math/rand/rand.go
m[i] = m[j] m[j] = i } return m } // Shuffle pseudo-randomizes the order of elements. // n is the number of elements. Shuffle panics if n < 0. // swap swaps the elements with indexes i and j. func (r *Rand) Shuffle(n int, swap func(i, j int)) { if n < 0 { panic("invalid argument to Shuffle") } // Fisher-Yates shuffle: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
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/math/rand/rand_test.go
if !bytes.Equal(b1, b2) { t.Errorf("mismatch after re-seed:\n%x\n%x", b1, b2) } } func TestShuffleSmall(t *testing.T) { // Check that Shuffle allows n=0 and n=1, but that swap is never called for them. r := New(NewSource(1)) for n := 0; n <= 1; n++ { r.Shuffle(n, func(i, j int) { t.Fatalf("swap called, n=%d i=%d j=%d", n, i, j) }) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0) -
src/math/rand/v2/rand_test.go
p := make([]int, n) // re-usable slice for Shuffle generator tests := [...]struct { name string fn func() int }{ {name: "Int32N", fn: func() int { return int(r.Int32N(int32(nfact))) }}, {name: "Perm", fn: func() int { return encodePerm(r.Perm(n)) }}, {name: "Shuffle", fn: func() int { // Generate permutation using Shuffle. for i := range p { p[i] = i }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 17.4K bytes - Viewed (0) -
src/crypto/aes/block.go
s2 := byteorder.BeUint32(src[8:12]) s3 := byteorder.BeUint32(src[12:16]) // First round just XORs input with key. s0 ^= xk[0] s1 ^= xk[1] s2 ^= xk[2] s3 ^= xk[3] // Middle rounds shuffle using tables. // Number of rounds is set by length of expanded key. nr := len(xk)/4 - 2 // - 2: one above, one more below k := 4 var t0, t1, t2, t3 uint32 for r := 0; r < nr; r++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 6.4K bytes - Viewed (0) -
src/testing/testing.go
m.exitCode = 0 return } if *shuffle != "off" { var n int64 var err error if *shuffle == "on" { n = time.Now().UnixNano() } else { n, err = strconv.ParseInt(*shuffle, 10, 64) if err != nil { fmt.Fprintln(os.Stderr, `testing: -shuffle should be "off", "on", or a valid integer:`, err) m.exitCode = 2 return } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 76.1K bytes - Viewed (0)