- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 8,288 for makeN (0.06 sec)
-
src/cmd/compile/internal/test/testdata/dupLoad_test.go
return uint16(v), uint16(v) | uint16(b[1])<<8 } func main1(t *testing.T) { const N = 100000 done := make(chan bool, 2) b := make([]byte, 2) go func() { for i := 0; i < N; i++ { b[0] = byte(i) b[1] = byte(i) } done <- true }() go func() { for i := 0; i < N; i++ { x, y := read1(b) if byte(x) != byte(y) { t.Errorf("x=%x y=%x\n", x, y) done <- false return } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 23 06:40:04 UTC 2020 - 1.5K bytes - Viewed (0) -
src/cmd/compile/internal/test/testdata/slice_test.go
// license that can be found in the LICENSE file. // This test makes sure that t.s = t.s[0:x] doesn't write // either the slice pointer or the capacity. // See issue #14855. package main import "testing" const N = 1000000 type X struct { s []int } func TestSlice(t *testing.T) { done := make(chan struct{}) a := make([]int, N+10) x := &X{a} go func() { for i := 0; i < N; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 23 06:40:04 UTC 2020 - 850 bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/schema/BUILD
flatbuffer_cc_library( name = "schema_fbs_with_mutable", srcs = ["schema.fbs"], compatible_with = get_compatible_with_portable(), flatc_args = [ "--gen-mutable", "--gen-object-api", ], out_prefix = "mutable/", ) # Generic schema for inference on device (but with reflections makes bigger). flatbuffer_cc_library(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Jun 02 08:36:05 UTC 2024 - 2.6K bytes - Viewed (0) -
test/fixedbugs/issue25897a.go
// license that can be found in the LICENSE file. // Make sure the runtime can scan args of an unstarted goroutine // which starts with a reflect-generated function. package main import ( "reflect" "runtime" ) const N = 100 func main() { runtime.GOMAXPROCS(1) // Run GC in a loop. This makes it more likely GC will catch // an unstarted goroutine then if we were to GC after kicking
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 19:04:48 UTC 2022 - 1.1K bytes - Viewed (0) -
test/fixedbugs/issue40629.go
// overwrite x on the garbage stack. defer func() { c := make(chan bool) go func() { useStack(1000) c <- true }() <-c }() // This defer causes a stack copy. // The old stack is now garbage. defer func() { useStack(1000) }() // Trigger a segfault. *g = 0 // Make the return statement unreachable. // That makes the stack map at the deferreturn call empty.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 14 21:49:36 UTC 2020 - 1.2K bytes - Viewed (0) -
test/typeparam/pragma.go
// errorcheck -0 -m // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Make sure the go:noinline pragma makes it from a // generic function to any of its stenciled instances. package main //go:noinline func f[T any](x T) T { return x } func main() { // ERROR "can inline main" println(f(5))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 411 bytes - Viewed (0) -
pkg/util/async/runner.go
*/ package async import ( "sync" ) // Runner is an abstraction to make it easy to start and stop groups of things that can be // described by a single function which waits on a channel close to exit. type Runner struct { lock sync.Mutex loopFuncs []func(stop chan struct{}) stop *chan struct{} } // NewRunner makes a runner for the given function(s). The function(s) should loop until // the channel is closed.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 29 06:37:00 UTC 2016 - 1.4K bytes - Viewed (0) -
test/strcopy.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that string([]byte(string)) makes a copy and doesn't reduce to // nothing. (Issue 25834) package main import ( "reflect" "unsafe" ) func main() { var ( buf = make([]byte, 2<<10) large = string(buf) sub = large[10:12] subcopy = string([]byte(sub))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 12 19:10:34 UTC 2018 - 674 bytes - Viewed (0) -
test/fixedbugs/issue24491b.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This test makes sure unsafe-uintptr arguments are not // kept alive longer than expected. package main import ( "runtime" "unsafe" ) var done = make(chan bool) func setup() unsafe.Pointer { s := "ok" runtime.SetFinalizer(&s, func(p *string) { close(done) }) return unsafe.Pointer(&s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Sep 13 07:54:42 UTC 2020 - 738 bytes - Viewed (0) -
test/makeslice.go
} // Test make in append panics for int slices since the gc compiler optimizes makes in appends. func testMakeInAppendInts(n uint64) { type T []int for _, length := range []int{0, 1} { t := make(T, length) shouldPanic("len out of range", func() { _ = append(t, make(T, int(n))...) }) shouldPanic("cap out of range", func() { _ = append(t, make(T, 0, int(n))...) }) shouldPanic("len out of range", func() { _ = append(t, make(T, int64(n))...) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 07 17:50:24 UTC 2020 - 5.5K bytes - Viewed (0)