Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for add_func (0.13 sec)

  1. tensorflow/cc/experimental/libtf/tests/object_test.cc

    }
    
    TEST(ObjectTest, TestCast) {
      Integer i(3);
      auto result = Cast<String>(i);
      ASSERT_TRUE(!result.ok());
    }
    
    TEST(ObjectTest, TestCall) {
      TaggedValue add_func(AddIntegers);
      Callable add(add_func);
      TF_ASSERT_OK_AND_ASSIGN(Integer i,
                              add.Call<Integer>(Integer(1), Integer(10)));
      EXPECT_EQ(i.get(), 11);
    
      TF_ASSERT_OK_AND_ASSIGN(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jul 28 21:37:07 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  2. 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)
  3. src/net/sock_posix.go

    	lsa, _ = syscall.Getsockname(fd.pfd.Sysfd)
    	if crsa != nil {
    		fd.setAddr(fd.addrFunc()(lsa), fd.addrFunc()(crsa))
    	} else if rsa, _ = syscall.Getpeername(fd.pfd.Sysfd); rsa != nil {
    		fd.setAddr(fd.addrFunc()(lsa), fd.addrFunc()(rsa))
    	} else {
    		fd.setAddr(fd.addrFunc()(lsa), raddr)
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. src/net/file_unix.go

    	default:
    		poll.CloseFunc(s)
    		return nil, syscall.EPROTONOSUPPORT
    	}
    	fd, err := newFD(s, family, sotype, "")
    	if err != nil {
    		poll.CloseFunc(s)
    		return nil, err
    	}
    	laddr := fd.addrFunc()(lsa)
    	raddr := fd.addrFunc()(rsa)
    	fd.net = laddr.Network()
    	if err := fd.init(); err != nil {
    		fd.Close()
    		return nil, err
    	}
    	fd.setAddr(laddr, raddr)
    	return fd, nil
    }
    
    func fileConn(f *os.File) (Conn, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. src/net/sockaddr_posix.go

    	// nil.
    	sockaddr(family int) (syscall.Sockaddr, error)
    
    	// toLocal maps the zero address to a local system address (127.0.0.1 or ::1)
    	toLocal(net string) sockaddr
    }
    
    func (fd *netFD) addrFunc() func(syscall.Sockaddr) Addr {
    	switch fd.family {
    	case syscall.AF_INET, syscall.AF_INET6:
    		switch fd.sotype {
    		case syscall.SOCK_STREAM:
    			return sockaddrToTCP
    		case syscall.SOCK_DGRAM:
    			return sockaddrToUDP
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  9. src/net/fd_unix.go

    		poll.CloseFunc(d)
    		return nil, err
    	}
    	if err = netfd.init(); err != nil {
    		netfd.Close()
    		return nil, err
    	}
    	lsa, _ := syscall.Getsockname(netfd.pfd.Sysfd)
    	netfd.setAddr(netfd.addrFunc()(lsa), netfd.addrFunc()(rsa))
    	return netfd, nil
    }
    
    // Defined in os package.
    func newUnixFile(fd int, name string) *os.File
    
    func (fd *netFD) dup() (f *os.File, err error) {
    	ns, call, err := fd.pfd.Dup()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 20:19:46 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  10. 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)
Back to top