- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of about 10,000 for i$ (0.04 sec)
-
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) -
test/ken/simparray.go
var b[10] float32; func main() { var a[10] float32; for i:=int16(5); i<10; i=i+1 { a[i] = float32(i); } s1 := float32(0); for i:=5; i<10; i=i+1 { s1 = s1 + a[i]; } if s1 != 35 { panic(s1); } for i:=int16(5); i<10; i=i+1 { b[i] = float32(i); } s2 := float32(0); for i:=5; i<10; i=i+1 { s2 = s2 + b[i]; } if s2 != 35 { panic(s2); } b := new([100]int);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 05:24:24 UTC 2012 - 730 bytes - Viewed (0) -
test/funcdup.go
package p type T interface { F1(i int) (i int) // ERROR "duplicate argument i|redefinition|previous|redeclared" F2(i, i int) // ERROR "duplicate argument i|redefinition|previous|redeclared" F3() (i, i int) // ERROR "duplicate argument i|redefinition|previous|redeclared" } type T1 func(i, i int) // ERROR "duplicate argument i|redefinition|previous|redeclared"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 04 21:22:23 UTC 2020 - 1.3K bytes - Viewed (0) -
src/container/heap/heap_test.go
for i := 1; h.Len() > 0; i++ { x := Pop(h).(int) h.verify(t, 0) if x != i { t.Errorf("%d.th pop got %d; want %d", i, x, i) } } } func Test(t *testing.T) { h := new(myHeap) h.verify(t, 0) for i := 20; i > 10; i-- { h.Push(i) } Init(h) h.verify(t, 0) for i := 10; i > 0; i-- { Push(h, i) h.verify(t, 0) } for i := 1; h.Len() > 0; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 3.4K bytes - Viewed (0) -
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) -
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) -
src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts
91: n += a 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t) n = 3 i = 1 t = 3 86: for i, a := range hist { 87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 91: n += a 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t) n = 6 i = 2 t = 9 86: for i, a := range hist { 87: if a == 0 { //gdb-opt=(a,n,t) 88: continue
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 04 20:41:52 UTC 2019 - 4K bytes - Viewed (0) -
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) -
src/runtime/slice_test.go
b.Run("Byte", func(b *testing.B) { var x []byte for i := 0; i < b.N; i++ { x = make([]byte, len(bytes)) copy(x, bytes) } }) b.Run("Int", func(b *testing.B) { var x []int for i := 0; i < b.N; i++ { x = make([]int, len(ints)) copy(x, ints) } }) b.Run("Ptr", func(b *testing.B) { var x []*byte for i := 0; i < b.N; i++ { x = make([]*byte, len(ptrs)) copy(x, ptrs)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 17 09:45:44 UTC 2020 - 10.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/testdata/scopes.dlv-opt.nexts
23: x := id(0) 24: y := id(0) 25: fmt.Println(x) 26: for i := x; i < 3; i++ { 27: x := i * i 28: y += id(x) //gdb-dbg=(x,y)//gdb-opt=(x,y) 26: for i := x; i < 3; i++ { 27: x := i * i 28: y += id(x) //gdb-dbg=(x,y)//gdb-opt=(x,y) 26: for i := x; i < 3; i++ { 27: x := i * i 28: y += id(x) //gdb-dbg=(x,y)//gdb-opt=(x,y) 26: for i := x; i < 3; i++ { 31: fmt.Println(x, y) 30: y = x + y //gdb-dbg=(x,y)//gdb-opt=(x,y)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 02 22:18:10 UTC 2019 - 1.1K bytes - Viewed (0)