- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 209 for nelem (1.57 sec)
-
src/cmd/compile/internal/types2/pointer.go
type Pointer struct { base Type // element type } // NewPointer returns a new pointer type for the given element (base) type. func NewPointer(elem Type) *Pointer { return &Pointer{base: elem} } // Elem returns the element type for the given pointer p. func (p *Pointer) Elem() Type { return p.base } func (p *Pointer) Underlying() Type { return p }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 01 22:17:50 UTC 2021 - 635 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]() related3[byte, List[byte]]()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 02 16:49:45 UTC 2023 - 4.3K bytes - Viewed (0) -
test/typeparam/orderedmap.go
// the receiver stops reading them. func _Ranger[Elem any]() (*_Sender[Elem], *_Receiver[Elem]) { c := make(chan Elem) d := make(chan struct{}) s := &_Sender[Elem]{ values: c, done: d, } r := &_Receiver[Elem]{ values: c, done: d, } runtime.SetFinalizer(r, (*_Receiver[Elem]).finalize) return s, r } // A _Sender is used to send values to a Receiver.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 7.1K bytes - Viewed (0) -
src/internal/reflectlite/set_test.go
func (mapError) Error() string { return "mapError" } var _ error = mapError{} var _ error = new(mapError) func TestImplements(t *testing.T) { for _, tt := range implementsTests { xv := TypeOf(tt.x).Elem() xt := TypeOf(tt.t).Elem() if b := xv.Implements(xt); b != tt.b { t.Errorf("(%s).Implements(%s) = %v, want %v", TypeString(xv), TypeString(xt), b, tt.b) } } } var assignableTests = []struct { x any t any
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 2.4K bytes - Viewed (0) -
src/cmd/compile/internal/walk/temp.go
// allocated temporary variable of type [len]elem. This variable is // initialized, and elem must not contain pointers. func stackBufAddr(len int64, elem *types.Type) *ir.AddrExpr { if elem.HasPointers() { base.FatalfAt(base.Pos, "%v has pointers", elem) } tmp := typecheck.TempAt(base.Pos, ir.CurFunc, types.NewArray(elem, len)) return typecheck.Expr(typecheck.NodAddr(tmp)).(*ir.AddrExpr)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 16:41:23 UTC 2024 - 1.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go
func TestLookupPtrToStruct(t *testing.T) { type Elem struct { Key string Value string } type Outer struct { Inner []Elem `json:"inner" patchStrategy:"merge" patchMergeKey:"key"` } outer := &Outer{} elemType, patchStrategies, patchMergeKey, err := LookupPatchMetadataForStruct(reflect.TypeOf(outer), "inner") if err != nil { t.Fatal(err) } if elemType != reflect.TypeOf([]Elem{}) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 20 22:35:14 UTC 2017 - 769 bytes - Viewed (0) -
src/runtime/race/testdata/reflect_test.go
ch := make(chan bool, 1) i := 0 v := reflect.ValueOf(&i) go func() { v.Elem().Set(reflect.ValueOf(1)) ch <- true }() _ = v.Elem().Int() <-ch } func TestRaceReflectWW(t *testing.T) { ch := make(chan bool, 1) i := 0 v := reflect.ValueOf(&i) go func() { v.Elem().Set(reflect.ValueOf(1)) ch <- true }() v.Elem().Set(reflect.ValueOf(2)) <-ch } func TestRaceReflectCopyWW(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 13:12:15 UTC 2016 - 811 bytes - Viewed (0) -
tensorflow/cc/framework/ops.cc
size_t offset = 0; for (auto const& e : v) { Tensor elem = e.tensor; if (first.tensor.dtype() == DT_STRING) { for (int i = 0; i < elem.NumElements(); ++i) { t.flat<tstring>()(offset + i) = elem.flat<tstring>()(i); } offset += elem.NumElements(); } else { std::copy_n(elem.tensor_data().data(), elem.TotalBytes(), const_cast<char*>(t.tensor_data().data()) + offset);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 11 01:20:50 UTC 2021 - 3.5K bytes - Viewed (0) -
src/cmd/go/internal/modload/search.go
return nil } want := true elem := "" // Don't use GOROOT/src but do walk down into it. if pkgDir == root { if importPathRoot == "" { return nil } } else { // Avoid .foo, _foo, and testdata subdirectory trees. _, elem = filepath.Split(pkgDir) if strings.HasPrefix(elem, ".") || strings.HasPrefix(elem, "_") || elem == "testdata" { want = false } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:15 UTC 2023 - 7.9K bytes - Viewed (0) -
src/path/filepath/path_unix.go
return strings.Split(path, string(ListSeparator)) } func abs(path string) (string, error) { return unixAbs(path) } func join(elem []string) string { // If there's a bug here, fix the logic in ./path_plan9.go too. for i, e := range elem { if e != "" { return Clean(strings.Join(elem[i:], string(Separator))) } } return "" } func sameWord(a, b string) bool { return a == b
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:50 UTC 2024 - 970 bytes - Viewed (0)