Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 377 for asSlice (0.19 sec)

  1. src/cmd/compile/internal/ssa/decompose.go

    				}
    				f.NamedValues[*ptrName] = append(f.NamedValues[*ptrName], v.Args[0])
    				f.NamedValues[*lenName] = append(f.NamedValues[*lenName], v.Args[1])
    				toDelete = append(toDelete, namedVal{i, j})
    			}
    		case t.IsSlice():
    			ptrName, lenName, capName := f.SplitSlice(name)
    			newNames = maybeAppend2(f, newNames, ptrName, lenName)
    			newNames = maybeAppend(f, newNames, capName)
    			for j, v := range f.NamedValues[*name] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 21:22:15 UTC 2022
    - 13.4K bytes
    - Viewed (0)
  2. tests/create_test.go

    		CheckPet(t, pet2, pet)
    	})
    
    	t.Run("Slice", func(t *testing.T) {
    		pets := []Pet{{
    			Name: "PolymorphicHasOne-Slice-1",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-1"},
    		}, {
    			Name: "PolymorphicHasOne-Slice-2",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-2"},
    		}, {
    			Name: "PolymorphicHasOne-Slice-3",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-3"},
    		}}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  3. common/scripts/kind_provisioner.sh

    from ipaddress import ip_network, IPv6Network;
    from itertools import islice;
    
    net = ip_network('$CIDR')
    net_bits = 128 if type(net) == IPv6Network else 32;
    net_len = pow(2, net_bits - net.prefixlen)
    start, end = int(net_len / 4 * 3), net_len
    if net_len > 2000:
      start, end = 1000, 2000
    
    [print(str(ip) + "/" + str(ip.max_prefixlen)) for ip in islice(ip_network('$CIDR').hosts(), start, end)]
    EOF
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 19:12:55 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  4. pkg/proxy/endpointslicecache.go

    	// slice trackers grouped by service name and endpoint slice name. The first
    	// key represents a namespaced service name while the second key represents
    	// an endpoint slice name. Since endpoints can move between slices, we
    	// require slice specific caching to prevent endpoints being removed from
    	// the cache when they may have just moved to a different slice.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:07:21 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  5. src/runtime/arena.go

    	}
    	i := efaceOf(&sl)
    	typ := i._type
    	if typ.Kind_&abi.KindMask != abi.Pointer {
    		panic("slice result of non-ptr type")
    	}
    	typ = (*ptrtype)(unsafe.Pointer(typ)).Elem
    	if typ.Kind_&abi.KindMask != abi.Slice {
    		panic("slice of non-ptr-to-slice type")
    	}
    	typ = (*slicetype)(unsafe.Pointer(typ)).Elem
    	// t is now the element type of the slice we want to allocate.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/complit.go

    		ir.SetPos(value)
    		as := ir.NewAssignStmt(base.Pos, a, value)
    		appendWalkStmt(init, orderStmtInPlace(typecheck.Stmt(as), map[string][]*ir.Name{}))
    	}
    
    	// make slice out of heap (6)
    	a = ir.NewAssignStmt(base.Pos, var_, ir.NewSliceExpr(base.Pos, ir.OSLICE, vauto, nil, nil, nil))
    	appendWalkStmt(init, orderStmtInPlace(typecheck.Stmt(a), map[string][]*ir.Name{}))
    }
    
    func maplit(n *ir.CompLitExpr, m ir.Node, init *ir.Nodes) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  7. tensorflow/cc/gradients/array_grad.cc

      auto x = op.input(0);
      auto a = op.input(1);  // [Rank(x), 2]
      // Takes a slice of a. The 1st column. [Rank(x), 1].
      auto size = Stack(scope, {Rank(scope, x), 1});
      auto pad_before = Slice(scope, a, {0, 0}, size);
      // Make it a 1-D tensor.
      auto begin = Reshape(scope, pad_before, {-1});
      grad_outputs->push_back(Slice(scope, grad_inputs[0], begin, Shape(scope, x)));
      grad_outputs->push_back(NoGradient());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 10 23:33:32 UTC 2023
    - 31.7K bytes
    - Viewed (0)
  8. src/cmd/trace/gstate.go

    		panic("non-executing goroutine stopped")
    	}
    	ctx.Slice(traceviewer.SliceEvent{
    		Name:     gs.name(),
    		Ts:       ctx.elapsed(gs.startRunningTime),
    		Dur:      ts.Sub(gs.startRunningTime),
    		Resource: uint64(gs.executing),
    		Stack:    stk,
    	})
    
    	// Flush completed ranges.
    	for _, cr := range gs.completedRanges {
    		ctx.Slice(traceviewer.SliceEvent{
    			Name:     cr.name,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  9. src/encoding/gob/decode.go

    		if safe < 0 {
    			errorf("%s slice too big: %d elements", value.Type(), n)
    		}
    		value.Set(reflect.MakeSlice(value.Type(), safe, safe))
    		ln := safe
    		i := 0
    		for i < n {
    			if i >= ln {
    				// We didn't allocate the entire slice,
    				// due to using saferio.SliceCap.
    				// Grow the slice for one more element.
    				// The slice is full, so this should
    				// bump up the capacity.
    				value.Grow(1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  10. src/strings/strings.go

    }
    
    // Split slices s into all substrings separated by sep and returns a slice of
    // the substrings between those separators.
    //
    // If s does not contain sep and sep is not empty, Split returns a
    // slice of length 1 whose only element is s.
    //
    // If sep is empty, Split splits after each UTF-8 sequence. If both s
    // and sep are empty, Split returns an empty slice.
    //
    // It is equivalent to [SplitN] with a count of -1.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top