Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 364 for iters (0.06 sec)

  1. src/internal/trace/testdata/testprog/futile-wakeup.go

    	done.Add(4 * procs)
    	for p := 0; p < procs; p++ {
    		const iters = 1e3
    		go func() {
    			trace.WithRegion(context.Background(), "special", func() {
    				for i := 0; i < iters; i++ {
    					runtime.Gosched()
    					c0 <- 0
    				}
    				done.Done()
    			})
    		}()
    		go func() {
    			trace.WithRegion(context.Background(), "special", func() {
    				for i := 0; i < iters; i++ {
    					runtime.Gosched()
    					<-c0
    				}
    				done.Done()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. src/internal/trace/testdata/testprog/stress-start-stop.go

    			select {}
    		}()
    
    		// Unblock helper goroutines and wait them to finish.
    		wp.Write(tmp[:])
    		wp.Write(tmp[:])
    		close(done)
    		wg.Wait()
    	}()
    
    	const iters = 5
    	for i := 0; i < iters; i++ {
    		var w io.Writer
    		if i == iters-1 {
    			w = os.Stdout
    		} else {
    			w = new(bytes.Buffer)
    		}
    		if err := trace.Start(w); err != nil {
    			log.Fatalf("failed to start tracing: %v", err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. src/testing/benchmark_test.go

    		procs := uint32(0)
    		iters := uint64(0)
    		b.SetParallelism(3)
    		b.RunParallel(func(pb *testing.PB) {
    			atomic.AddUint32(&procs, 1)
    			for pb.Next() {
    				atomic.AddUint64(&iters, 1)
    			}
    		})
    		if want := uint32(3 * runtime.GOMAXPROCS(0)); procs != want {
    			t.Errorf("got %v procs, want %v", procs, want)
    		}
    		if iters != uint64(b.N) {
    			t.Errorf("got %v iters, want %v", iters, b.N)
    		}
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. src/math/rand/rand_test.go

    					for i := range samples {
    						// Generate some uniformly distributed values and count their occurrences.
    						const iters = 1000
    						counts := make([]int, nfact)
    						for i := 0; i < iters; i++ {
    							counts[test.fn()]++
    						}
    						// Calculate chi-squared and add to samples.
    						want := iters / float64(nfact)
    						var χ2 float64
    						for _, have := range counts {
    							err := float64(have) - want
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  5. src/math/rand/v2/rand_test.go

    					for i := range samples {
    						// Generate some uniformly distributed values and count their occurrences.
    						const iters = 1000
    						counts := make([]int, nfact)
    						for i := 0; i < iters; i++ {
    							counts[test.fn()]++
    						}
    						// Calculate chi-squared and add to samples.
    						want := iters / float64(nfact)
    						var χ2 float64
    						for _, have := range counts {
    							err := float64(have) - want
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

      //             Policy.setPolicy(permissivePolicy());
      //             System.setSecurityManager(new SecurityManager());
      //         }
      //         int iters = (args.length == 0) ? 1 : Integer.parseInt(args[0]);
    
      //         Test s = suite();
      //         for (int i = 0; i < iters; ++i) {
      //             junit.textui.TestRunner.run(s);
      //             System.gc();
      //             System.runFinalization();
      //         }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  7. src/runtime/export_test.go

    			if gs[j].sig != 1 {
    				print("bad element ", j, "(", gs[j].sig, ") at iter ", i, "\n")
    				throw("bad element")
    			}
    		}
    		if s != i/2 && s != i/2+1 {
    			print("bad steal ", s, ", want ", i/2, " or ", i/2+1, ", iter ", i, "\n")
    			throw("bad steal")
    		}
    	}
    }
    
    func RunSchedLocalQueueEmptyTest(iters int) {
    	// Test that runq is not spuriously reported as empty.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/rewrite.go

    				if vchange && debug > 1 {
    					fmt.Printf("rewriting %s  ->  %s\n", v0.LongString(), v.LongString())
    				}
    			}
    		}
    		if !change && !deadChange {
    			break
    		}
    		iters++
    		if (iters > itersLimit || debug >= 2) && change {
    			// We've done a suspiciously large number of rewrites (or we're in debug mode).
    			// As of Sep 2021, 90% of rewrites complete in 4 iterations or fewer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  9. src/maps/iter.go

    // license that can be found in the LICENSE file.
    
    package maps
    
    import "iter"
    
    // All returns an iterator over key-value pairs from m.
    // The iteration order is not specified and is not guaranteed
    // to be the same from one call to the next.
    func All[Map ~map[K]V, K comparable, V any](m Map) iter.Seq2[K, V] {
    	return func(yield func(K, V) bool) {
    		for k, v := range m {
    			if !yield(k, v) {
    				return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 13:41:45 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  10. src/reflect/iter.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package reflect
    
    import "iter"
    
    func rangeNum[T int8 | int16 | int32 | int64 | int |
    	uint8 | uint16 | uint32 | uint64 | uint |
    	uintptr, N int64 | uint64](v N) iter.Seq[Value] {
    	return func(yield func(v Value) bool) {
    		// cannot use range T(v) because no core type.
    		for i := T(0); i < T(v); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 13:40:11 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top