Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 207 for elem4 (0.13 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stdversion/stdversion.go

    			return named.Origin().Obj()
    		}
    	}
    	return obj
    }
    
    // TODO(adonovan): use go1.21 slices.Contains.
    func slicesContains[S ~[]E, E comparable](slice S, x E) bool {
    	for _, elem := range slice {
    		if elem == x {
    			return true
    		}
    	}
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/types/typeutil/map.go

    	case *types.Basic:
    		return uint32(t.Kind())
    
    	case *aliases.Alias:
    		return h.Hash(aliases.Unalias(t))
    
    	case *types.Array:
    		return 9043 + 2*uint32(t.Len()) + 3*h.Hash(t.Elem())
    
    	case *types.Slice:
    		return 9049 + 2*h.Hash(t.Elem())
    
    	case *types.Struct:
    		var hash uint32 = 9059
    		for i, n := 0, t.NumFields(); i < n; i++ {
    			f := t.Field(i)
    			if f.Anonymous() {
    				hash += 8861
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. src/encoding/json/encode.go

    	}
    	se.arrayEnc(e, v, opts)
    	e.ptrLevel--
    }
    
    func newSliceEncoder(t reflect.Type) encoderFunc {
    	// Byte slices get special treatment; arrays don't.
    	if t.Elem().Kind() == reflect.Uint8 {
    		p := reflect.PointerTo(t.Elem())
    		if !p.Implements(marshalerType) && !p.Implements(textMarshalerType) {
    			return encodeByteSlice
    		}
    	}
    	enc := sliceEncoder{newArrayEncoder(t)}
    	return enc.encode
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/facts/facts.go

    	if obj == nil {
    		panic("nil object")
    	}
    	key := key{pkg: obj.Pkg(), obj: obj, t: reflect.TypeOf(ptr)}
    	s.mu.Lock()
    	defer s.mu.Unlock()
    	if v, ok := s.m[key]; ok {
    		reflect.ValueOf(ptr).Elem().Set(reflect.ValueOf(v).Elem())
    		return true
    	}
    	return false
    }
    
    // ExportObjectFact implements analysis.Pass.ExportObjectFact.
    func (s *Set) ExportObjectFact(obj types.Object, fact analysis.Fact) {
    	if obj.Pkg() != s.pkg {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	var selectedObjects []runtime.Object
    	for _, obj := range objs {
    		elem, ok := obj.(*storeElement)
    		if !ok {
    			return fmt.Errorf("non *storeElement returned from storage: %v", obj)
    		}
    		if filter(elem.Key, elem.Labels, elem.Fields) {
    			selectedObjects = append(selectedObjects, elem.Object)
    		}
    	}
    	if len(selectedObjects) == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

            storage_type_max);
      } else {
        SmallVector<double> scales_vec;
        SmallVector<int64_t> zero_points_vec;
        for (auto elem : scales.getValues<float>()) scales_vec.push_back(elem);
        for (auto elem : zero_points.getValues<int32_t>())
          zero_points_vec.push_back(elem);
        elem_ty = quant::UniformQuantizedPerAxisType::get(
            flags, storage_type, expressed_type, scales_vec, zero_points_vec,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  7. pkg/typemap/map.go

    type TypeMap struct {
    	inner map[reflect.Type]any
    }
    
    func NewTypeMap() TypeMap {
    	return TypeMap{make(map[reflect.Type]any)}
    }
    
    func Set[T any](t TypeMap, v T) {
    	interfaceType := reflect.TypeOf((*T)(nil)).Elem()
    	t.inner[interfaceType] = v
    }
    
    func Get[T any](t TypeMap) *T {
    	v, f := t.inner[reflect.TypeFor[T]()]
    	if f {
    		return ptr.Of(v.(T))
    	}
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation_test.go

    		}
    	}
    
    	// check that anything other than type and properties in metadata is forbidden
    	tt = reflect.TypeOf(Structural{})
    	for i := 0; i < tt.NumField(); i++ {
    		s := Structural{}
    		x := reflect.ValueOf(&s).Elem()
    		fuzzer.Fuzz(x.Field(i).Addr().Interface())
    		s.Type = "object"
    		s.Properties = map[string]Structural{
    			"name":         {},
    			"generateName": {},
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 18:20:00 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. src/go/types/unify.go

    			// assume they are the same to avoid spurious follow-on errors.
    			return (x.len < 0 || y.len < 0 || x.len == y.len) && u.nify(x.elem, y.elem, emode, p)
    		}
    
    	case *Slice:
    		// Two slice types unify if their element types unify.
    		if y, ok := y.(*Slice); ok {
    			return u.nify(x.elem, y.elem, emode, p)
    		}
    
    	case *Struct:
    		// Two struct types unify if they have the same sequence of fields,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/infer.go

    	}()
    
    	switch t := typ.(type) {
    	case *Basic:
    		// nothing to do
    
    	case *Alias:
    		return w.isParameterized(Unalias(t))
    
    	case *Array:
    		return w.isParameterized(t.elem)
    
    	case *Slice:
    		return w.isParameterized(t.elem)
    
    	case *Struct:
    		return w.varList(t.fields)
    
    	case *Pointer:
    		return w.isParameterized(t.base)
    
    	case *Tuple:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.4K bytes
    - Viewed (0)
Back to top