- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 275 for asSlice (0.18 sec)
-
doc/next/6-stdlib/3-iter.md
- [All](/pkg/slices#All) returns an iterator over slice indexes and values. - [Values](/pkg/slices#Values) returns an iterator over slice elements. - [Backward](/pkg/slices#Backward) returns an iterator that loops over a slice backward. - [Collect](/pkg/slices#Collect) collects values from an iterator into a new slice. - [AppendSeq](/pkg/slices#AppendSeq) appends values from an iterator to an existing slice.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:13 UTC 2024 - 1.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/tests/convert_tf_xla_op_to_tf_op.mlir
// CHECK: %[[slice:.*]] = "tf.Slice"(%arg0, %[[tensor_scatter_update]], %[[arg2_i64]]) : (tensor<?x2xf32>, tensor<2xi64>, tensor<2xi64>) -> tensor<*xf32> // CHECK: %[[reshape:.*]] = "tf.Reshape"(%[[slice]], %[[cst_1]]) : (tensor<*xf32>, tensor<1xi64>) -> tensor<*xf32> // CHECK: return %[[reshape]] : tensor<*xf32> // ----- // Tests that the converted `tf.Slice` has the correct number of dimensions
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Oct 30 06:52:55 UTC 2023 - 3.7K bytes - Viewed (0) -
test/convert4.go
func() { _ = (*[9]byte)(s) }, "runtime error: cannot convert slice with length 8 to array or pointer to array with length 9", ) wantPanic( func() { _ = [9]byte(s) }, "runtime error: cannot convert slice with length 8 to array or pointer to array with length 9", ) var n []byte if p := (*[0]byte)(n); p != nil { panic("nil slice converted to *[0]byte should be nil") } _ = [0]byte(n)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 19 18:58:26 UTC 2022 - 2.1K bytes - Viewed (0) -
src/cmd/compile/internal/staticdata/embed.go
if kind == embedBytes { objw.Uintptr(sym, off, uint64(size)) // cap for slice } case embedFiles: slicedata := v.Sym().Pkg.Lookup(v.Sym().Name + `.files`).Linksym() off := 0 // []files pointed at by Files off = objw.SymPtr(slicedata, off, slicedata, 3*types.PtrSize) // []file, pointing just past slice off = objw.Uintptr(slicedata, off, uint64(len(files)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 10 18:22:02 UTC 2023 - 4.8K bytes - Viewed (0) -
pkg/slices/slices.go
} // SortFunc sorts the slice x in ascending order as determined by the less function. // This sort is not guaranteed to be stable. // The slice is modified in place but returned. func SortFunc[E any](x []E, less func(a, b E) int) []E { if len(x) <= 1 { return x } slices.SortFunc(x, less) return x } // SortStableFunc sorts the slice x while keeping the original order of equal element.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 15 06:28:11 UTC 2024 - 7.9K bytes - Viewed (0) -
pkg/apis/extensions/v1beta1/conversion.go
return err } if out.Ingress == nil { // Produce a zero-length non-nil slice for compatibility with previous manual conversion. out.Ingress = make([]networking.NetworkPolicyIngressRule, 0) } if out.Egress == nil { // Produce a zero-length non-nil slice for compatibility with previous manual conversion. out.Egress = make([]networking.NetworkPolicyEgressRule, 0) } return nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 07:16:15 UTC 2023 - 8.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix.go
// Retrieve the size of the shared memory to enable slice creation var info SysvShmDesc _, err := SysvShmCtl(id, IPC_STAT, &info) if err != nil { // release the shared memory if we can't find the size // ignoring error from shmdt as there's nothing sensible to return here shmdt(addr) return nil, err } // Use unsafe to convert addr into a []byte. b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 16:12:58 UTC 2024 - 1.4K bytes - Viewed (0) -
src/internal/types/testdata/examples/inference.go
// last. related2(1.2, []float64{}) related2(1.0, []int{}) related2 /* ERROR "Slice (type []int) does not satisfy interface{[]Elem}" */ (float64(1.0), []int{}) // TODO(gri) better error message } type List[P any] []P func related3[Elem any, Slice []Elem | List[Elem]]() Slice { return nil } func _() { // related3 can be instantiated explicitly related3[int, []int]()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 02 16:49:45 UTC 2023 - 4.3K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue64406.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 29 20:34:33 UTC 2023 - 403 bytes - Viewed (0) -
src/syscall/dir_plan9.go
// returning the remaining slice of b.. func pstring(b []byte, s string) []byte { b = pbit16(b, uint16(len(s))) n := copy(b, s) return b[n:] } // gbit8 reads an 8-bit number from b and returns it with the remaining slice of b. func gbit8(b []byte) (uint8, []byte) { return uint8(b[0]), b[1:] } // gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b. // //go:nosplit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:32:38 UTC 2024 - 5.2K bytes - Viewed (0)