Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 5,953 for i$ (0.12 sec)

  1. src/sort/sort_slices_benchmark_test.go

    	r := rand.New(rand.NewPCG(42, 0))
    	ints := make([]int, n)
    	for i := 0; i < n; i++ {
    		ints[i] = r.IntN(n)
    	}
    	return ints
    }
    
    func makeSortedInts(n int) []int {
    	ints := make([]int, n)
    	for i := 0; i < n; i++ {
    		ints[i] = i
    	}
    	return ints
    }
    
    func makeReversedInts(n int) []int {
    	ints := make([]int, n)
    	for i := 0; i < n; i++ {
    		ints[i] = n - i
    	}
    	return ints
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 22:59:40 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. src/reflect/iter_test.go

    		{"func", ValueOf(func(f func(int, int) bool) {
    			for i := range 4 {
    				f(i, i+1)
    			}
    		}), func(t *testing.T, s iter.Seq2[Value, Value]) {
    			i := int64(0)
    			for v1, v2 := range s {
    				if v1.Int() != i {
    					t.Fatalf("got %d, want %d", v1.Int(), i)
    				}
    				i++
    				if v2.Int() != i {
    					t.Fatalf("got %d, want %d", v2.Int(), i)
    				}
    			}
    			if i != 4 {
    				t.Fatalf("should loop four times")
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 14:27:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. test/checkbce.go

    	a[5] = 1
    	a[5] = 1
    }
    
    func f1(a [256]int, i int) {
    	var j int
    	useInt(a[i]) // ERROR "Found IsInBounds$"
    	j = i % 256
    	useInt(a[j]) // ERROR "Found IsInBounds$"
    	j = i & 255
    	useInt(a[j])
    	j = i & 17
    	useInt(a[j])
    
    	if 4 <= i && i < len(a) {
    		useInt(a[i])
    		useInt(a[i-1])
    		useInt(a[i-4])
    	}
    }
    
    func f2(a [256]int, i uint) {
    	useInt(a[i]) // ERROR "Found IsInBounds$"
    	j := i % 256
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/text/unicode/norm/iter.go

    	}
    	if i.rb.src.str[p] < utf8.RuneSelf {
    		i.buf[0] = i.rb.src.str[i.p]
    		i.p = p
    		return i.buf[:1]
    	}
    	i.info = i.rb.f.info(i.rb.src, i.p)
    	i.next = i.rb.f.nextMain
    	return i.next(i)
    }
    
    func nextHangul(i *Iter) []byte {
    	p := i.p
    	next := p + hangulUTF8Size
    	if next >= i.rb.nsrc {
    		i.setDone()
    	} else if i.rb.src.hangul(next) == 0 {
    		i.rb.ss.next(i.info)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 11K bytes
    - Viewed (0)
  5. src/sync/atomic/atomic_test.go

    func TestAndInt32(t *testing.T) {
    	var x struct {
    		before int32
    		i      int32
    		after  int32
    	}
    	x.before = magic32
    	x.after = magic32
    	x.i = -1
    	j := x.i
    	for mask := int32(1); mask != 0; mask <<= 1 {
    		old := x.i
    		k := AndInt32(&x.i, ^mask)
    		j &= ^mask
    		if x.i != j || k != old {
    			t.Fatalf("mask=%d i=%d j=%d k=%d old=%d", mask, x.i, j, k, old)
    		}
    	}
    	if x.before != magic32 || x.after != magic32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 71.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

      public void testGetSet() {
        AtomicDoubleArray aa = new AtomicDoubleArray(VALUES.length);
        for (int i = 0; i < VALUES.length; i++) {
          assertBitEquals(0.0, aa.get(i));
          aa.set(i, VALUES[i]);
          assertBitEquals(VALUES[i], aa.get(i));
          aa.set(i, -3.0);
          assertBitEquals(-3.0, aa.get(i));
        }
      }
    
      /** get returns the last value lazySet at index by same thread */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/test/math_test.go

    	for i := 1; i <= b.N; i++ {
    		r = -(int64(i) - r) % int64(i)
    	}
    	Output = int(r)
    }
    
    func BenchmarkMod64SmallNegBoth(b *testing.B) {
    	r := int64(1)
    	for i := 1; i <= b.N; i++ {
    		r = -(int64(i) + r) % -int64(i)
    	}
    	Output = int(r)
    }
    
    func BenchmarkMod64Unsigned(b *testing.B) {
    	r := uint64(1)
    	for i := 1; i <= b.N; i++ {
    		r = (uint64(0x7fffffffffffffff) - uint64(i) - (r & 1)) % uint64(i)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

      public void testGetSet() {
        AtomicDoubleArray aa = new AtomicDoubleArray(VALUES.length);
        for (int i = 0; i < VALUES.length; i++) {
          assertBitEquals(0.0, aa.get(i));
          aa.set(i, VALUES[i]);
          assertBitEquals(VALUES[i], aa.get(i));
          aa.set(i, -3.0);
          assertBitEquals(-3.0, aa.get(i));
        }
      }
    
      /** get returns the last value lazySet at index by same thread */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  9. test/loopbce.go

    		a[i-5] = i  // ERROR "(\([0-9]+\) )?Proved IsInBounds$"
    		a[i] = i    // ERROR "(\([0-9]+\) )?Proved IsInBounds$"
    		a[i+5] = i  // ERROR "(\([0-9]+\) )?Proved IsInBounds$"
    		a[i+10] = i // ERROR "(\([0-9]+\) )?Proved IsInBounds$"
    		a[i+11] = i
    	}
    	return a
    }
    
    func k1(a [100]int) [100]int {
    	for i := 10; i < 90; i++ { // ERROR "Induction variable: limits \[10,90\), increment 1$"
    		if a[0] == 0xdeadbeef {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  10. src/cmd/vendor/rsc.io/markdown/table.go

    	col := 0
    	delim := tableTrimOuter(delim1)
    	i := 0
    	for ; ; col++ {
    		for i < len(delim) && isTableSpace(delim[i]) {
    			i++
    		}
    		if i >= len(delim) {
    			break
    		}
    		if i < len(delim) && delim[i] == ':' {
    			i++
    		}
    		if i >= len(delim) || delim[i] != '-' {
    			return false
    		}
    		i++
    		for i < len(delim) && delim[i] == '-' {
    			i++
    		}
    		if i < len(delim) && delim[i] == ':' {
    			i++
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 5.4K bytes
    - Viewed (0)
Back to top