Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 87 for AddFunc (0.14 sec)

  1. src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.go

    		// AddFunc calls), then we could not definitively select the
    		// correct callee.
    		val += int(ops.m(42, int64(ops.a(1, 2))))
    	}
    	return val
    }
    
    //go:noinline
    func AddClosure() AddFunc {
    	// Implicit closure by capturing the receiver.
    	var a Add
    	return a.Add
    }
    
    //go:noinline
    func SubClosure() AddFunc {
    	var s Sub
    	return s.Add
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 13 18:17:57 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  2. plugin/pkg/auth/authorizer/node/graph_populator.go

    		AddFunc:    g.addPod,
    		UpdateFunc: g.updatePod,
    		DeleteFunc: g.deletePod,
    	})
    
    	pvsHandler, _ := pvs.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc:    g.addPV,
    		UpdateFunc: g.updatePV,
    		DeleteFunc: g.deletePV,
    	})
    
    	attachHandler, _ := attachments.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc:    g.addVolumeAttachment,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. pkg/kube/controllers/common.go

    type EventHandler[T Object] struct {
    	AddFunc         func(obj T)
    	AddExtendedFunc func(obj T, initialSync bool)
    	UpdateFunc      func(oldObj, newObj T)
    	DeleteFunc      func(obj T)
    }
    
    func (e EventHandler[T]) OnAdd(obj interface{}, initialSync bool) {
    	if e.AddExtendedFunc != nil {
    		e.AddExtendedFunc(Extract[T](obj), initialSync)
    	} else if e.AddFunc != nil {
    		e.AddFunc(Extract[T](obj))
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 08:27:29 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. src/internal/coverage/test/roundtrip_test.go

    			coverage.CoverableUnit{StLine: 1, StCol: 2, EnLine: 3, EnCol: 4, NxStmts: 5},
    			coverage.CoverableUnit{StLine: 6, StCol: 7, EnLine: 8, EnCol: 9, NxStmts: 10},
    		},
    	}
    	idx := b.AddFunc(f1)
    	if idx != 0 {
    		t.Errorf("b.AddFunc(f1) got %d want %d", idx, 0)
    	}
    
    	f2 := coverage.FuncDesc{
    		Funcname: "xfunc",
    		Srcfile:  "bar.go",
    		Units: []coverage.CoverableUnit{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 21:42:05 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  5. tensorflow/cc/experimental/libtf/tests/function_test.cc

            /*arg=*/{"x"},
            /*attr=*/{{"T", DT_FLOAT}},
            /*dep=*/{},
            /*device=*/"",
            /*name=*/"square"}});
    }
    
    FunctionDef AddFunc() {
      return FunctionDefHelper::Define(
          // Function Name
          "AddFunc",
          // Args
          {"x: float", "y: float"},
          // Returns
          {"z: float"},
          // Attr def
          {},
          // Nodes
          {{/*ret=*/{"z"},
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 21:44:52 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/test/testdata/pgo/devirtualize/mult.pkg/mult.go

    		sink++
    	}
    	return a * b
    }
    
    type NegMult struct{}
    
    func (NegMult) Multiply(a, b int) int {
    	for i := 0; i < 1000; i++ {
    		sink++
    	}
    	return -1 * a * b
    }
    
    // N.B. Different types than AddFunc to test intra-line disambiguation.
    type MultFunc func(int64, int64) int64
    
    func MultFn(a, b int64) int64 {
    	for i := 0; i < 1000; i++ {
    		sink++
    	}
    	return a * b
    }
    
    func NegMultFn(a, b int64) int64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 13 18:17:57 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go

    }
    
    // AddFuncs is a shortcut for multiple calls to AddFunc.
    func (e Equalities) AddFuncs(funcs ...interface{}) error {
    	for _, f := range funcs {
    		if err := e.AddFunc(f); err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    // AddFunc uses func as an equality function: it must take
    // two parameters of the same type, and return a boolean.
    func (e Equalities) AddFunc(eqFunc interface{}) error {
    	fv := reflect.ValueOf(eqFunc)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 20 17:18:42 UTC 2022
    - 10.8K bytes
    - Viewed (0)
  8. pkg/scheduler/eventhandlers.go

    					return false
    				default:
    					utilruntime.HandleError(fmt.Errorf("unable to handle object in %T: %T", sched, obj))
    					return false
    				}
    			},
    			Handler: cache.ResourceEventHandlerFuncs{
    				AddFunc:    sched.addPodToCache,
    				UpdateFunc: sched.updatePodInCache,
    				DeleteFunc: sched.deletePodFromCache,
    			},
    		},
    	); err != nil {
    		return err
    	}
    	handlers = append(handlers, handlerRegistration)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:21:04 UTC 2024
    - 24K bytes
    - Viewed (0)
  9. src/internal/coverage/encodemeta/encode.go

    	tmp = tmp[:0]
    	tmp = append(tmp, 0, 0, 0, 0)
    	binary.LittleEndian.PutUint32(tmp, x)
    	h.Write(tmp)
    }
    
    type funcDesc struct {
    	encoded []byte
    }
    
    // AddFunc registers a new function with the meta data builder.
    func (b *CoverageMetaDataBuilder) AddFunc(f coverage.FuncDesc) uint {
    	hashFuncDesc(b.h, &f, b.tmp)
    	fd := funcDesc{}
    	b.tmp = b.tmp[:0]
    	b.tmp = uleb128.AppendUleb128(b.tmp, uint(len(f.Units)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 17:16:10 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/peerproxy/peerproxy.go

    		serializer:            serializer,
    	}
    	svi := informerFactory.Internal().V1alpha1().StorageVersions()
    	h.storageversionInformer = svi.Informer()
    
    	svi.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc: func(obj interface{}) {
    			h.addSV(obj)
    		},
    		UpdateFunc: func(oldObj, newObj interface{}) {
    			h.updateSV(oldObj, newObj)
    		},
    		DeleteFunc: func(obj interface{}) {
    			h.deleteSV(obj)
    		}})
    	return h
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 19 00:36:22 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top