Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for shuffled (0.46 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.cc

      SmallVector<Attribute, 8> shuffled(values.size());
    
      for (size_t i = 0; i < permutation.size(); ++i) {
        for (size_t j = 0; j < inner_size; ++j) {
          shuffled[i * inner_size + j] = values[permutation[i] * inner_size + j];
        }
      }
    
      return ArrayAttr::get(attr.getContext(), shuffled);
    }
    
    // Shuffle ranked tensor dimensions according to the permutation.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. 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)
  3. src/slices/sort_test.go

    	}
    
    	// already sorted
    	data.initB()
    	SortStableFunc(data, intPairCmp)
    	if !IsSortedFunc(data, intPairCmp) {
    		t.Errorf("Stable shuffled sorted %d ints (order)", n)
    	}
    	if !data.inOrder(false) {
    		t.Errorf("Stable shuffled sorted %d ints (stability)", n)
    	}
    
    	// sorted reversed
    	for i := 0; i < len(data); i++ {
    		data[i].a = len(data) - i
    	}
    	data.initB()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  4. pkg/controller/replicaset/replica_set_test.go

    	}
    	fakePodControl.Clear()
    }
    
    // shuffle returns a new shuffled list of container controllers.
    func shuffle(controllers []*apps.ReplicaSet) []*apps.ReplicaSet {
    	numControllers := len(controllers)
    	randIndexes := rand.Perm(numControllers)
    	shuffled := make([]*apps.ReplicaSet, numControllers)
    	for i := 0; i < numControllers; i++ {
    		shuffled[i] = controllers[randIndexes[i]]
    	}
    	return shuffled
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 69.2K bytes
    - Viewed (0)
  5. pkg/kubelet/status/status_manager_test.go

    	verifyUpdates(t, m, 0)
    }
    
    // shuffle returns a new shuffled list of container statuses.
    func shuffle(statuses []v1.ContainerStatus) []v1.ContainerStatus {
    	numStatuses := len(statuses)
    	randIndexes := rand.Perm(numStatuses)
    	shuffled := make([]v1.ContainerStatus, numStatuses)
    	for i := 0; i < numStatuses; i++ {
    		shuffled[i] = statuses[randIndexes[i]]
    	}
    	return shuffled
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 16:27:19 UTC 2024
    - 68.1K bytes
    - Viewed (0)
  6. src/compress/bzip2/bzip2.go

    // first pass over the data. It's an argument here because we merge the first
    // pass with the Huffman decoding.
    //
    // This also implements the “single array” method from the bzip2 source code
    // which leaves the output, still shuffled, in the bottom 8 bits of tt with the
    // index of the next byte in the top 24-bits. The index of the first byte is
    // returned.
    func inverseBWT(tt []uint32, origPtr uint, c []uint) uint32 {
    	sum := uint(0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 13K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top