Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 20 for IsSlice3 (0.22 sec)

  1. src/text/template/funcs.go

    		return item.Slice(idx[0], idx[1]), nil
    	}
    	// given item[i:j:k], make sure i <= j <= k.
    	if idx[1] > idx[2] {
    		return reflect.Value{}, fmt.Errorf("invalid slice index: %d > %d", idx[1], idx[2])
    	}
    	return item.Slice3(idx[0], idx[1], idx[2]), nil
    }
    
    // Length
    
    // length returns the length of the item, with an error if it has no defined length.
    func length(item reflect.Value) (int, error) {
    	item, isNil := indirect(item)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  2. src/reflect/value.go

    	fl := v.flag.ro() | flagIndir | flag(Slice)
    	return Value{typ.Common(), unsafe.Pointer(&x), fl}
    }
    
    // Slice3 is the 3-index form of the slice operation: it returns v[i:j:k].
    // It panics if v's Kind is not [Array] or [Slice], or if v is an unaddressable array,
    // or if the indexes are out of bounds.
    func (v Value) Slice3(i, j, k int) Value {
    	var (
    		cap  int
    		typ  *sliceType
    		base unsafe.Pointer
    	)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  3. src/go/parser/parser_test.go

    	{name: "dot", format: "package main; var x = «x.»x"},
    	{name: "index", format: "package main; var x = x«[1]»"},
    	{name: "slice", format: "package main; var x = x«[1:2]»"},
    	{name: "slice3", format: "package main; var x = x«[1:2:3]»"},
    	{name: "dottype", format: "package main; var x = x«.(any)»"},
    	{name: "callseq", format: "package main; var x = x«()»"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/typecheck.go

    	case ir.OSTRINGHEADER:
    		n := n.(*ir.StringHeaderExpr)
    		return tcStringHeader(n)
    
    	case ir.OMAKESLICECOPY:
    		n := n.(*ir.MakeExpr)
    		return tcMakeSliceCopy(n)
    
    	case ir.OSLICE, ir.OSLICE3:
    		n := n.(*ir.SliceExpr)
    		return tcSlice(n)
    
    	// call and call like
    	case ir.OCALL:
    		n := n.(*ir.CallExpr)
    		return tcCall(n, top)
    
    	case ir.OCAP, ir.OLEN:
    		n := n.(*ir.UnaryExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  5. src/go/ast/ast.go

    		Lbrack token.Pos // position of "["
    		Low    Expr      // begin of slice range; or nil
    		High   Expr      // end of slice range; or nil
    		Max    Expr      // maximum capacity of slice; or nil
    		Slice3 bool      // true if 3-index slice (2 colons present)
    		Rbrack token.Pos // position of "]"
    	}
    
    	// A TypeAssertExpr node represents an expression followed by a
    	// type assertion.
    	//
    	TypeAssertExpr struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/tests/lower_tf.mlir

      // CHECK:      %[[SLICE3:.*]] = "tf.Slice"(%[[CONCAT]], %[[CST5]], %[[CST6]]) : (tensor<3x8x4xi32>, tensor<3xi64>, tensor<3xi64>) -> tensor<3x6x4xi32>
      // CHECK:      %[[CONCAT1:.*]] = "tf.ConcatV2"(%[[SLICE2]], %[[SLICE3]], %[[CST7]]) : (tensor<3x2x4xi32>, tensor<3x6x4xi32>, tensor<i32>) -> tensor<3x8x4xi32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 05 18:35:42 UTC 2024
    - 92K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/order.go

    			o.exprList(n.Args)
    		}
    
    		if lhs == nil || lhs.Op() != ir.ONAME && !ir.SameSafeExpr(lhs, n.Args[0]) {
    			return o.copyExpr(n)
    		}
    		return n
    
    	case ir.OSLICE, ir.OSLICEARR, ir.OSLICESTR, ir.OSLICE3, ir.OSLICE3ARR:
    		n := n.(*ir.SliceExpr)
    		n.X = o.expr(n.X, nil)
    		n.Low = o.cheapExpr(o.expr(n.Low, nil))
    		n.High = o.cheapExpr(o.expr(n.High, nil))
    		n.Max = o.cheapExpr(o.expr(n.Max, nil))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/tests/legalize-tf.mlir

      // CHECK: %[[SLICE3:.*]] = "mhlo.slice"(%{{.*}}) <{limit_indices = dense<[4, 3, 6]> : tensor<3xi64>, start_indices = dense<[0, 2, 0]> : tensor<3xi64>, strides = dense<1> : tensor<3xi64>}> : (tensor<4x3x6xf32>) -> tensor<4x1x6xf32>
      // CHECK: %[[RES3:.*]] = mhlo.reshape %[[SLICE3]] : (tensor<4x1x6xf32>) -> tensor<4x6xf32>
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 06 18:46:23 UTC 2024
    - 335.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssagen/ssa.go

    			}
    		} else {
    			if rhs == nil {
    				r = s.zeroVal(t)
    			} else {
    				r = s.expr(rhs)
    			}
    		}
    
    		var skip skipMask
    		if rhs != nil && (rhs.Op() == ir.OSLICE || rhs.Op() == ir.OSLICE3 || rhs.Op() == ir.OSLICESTR) && ir.SameSafeExpr(rhs.(*ir.SliceExpr).X, n.X) {
    			// We're assigning a slicing operation back to its source.
    			// Don't write back fields we aren't changing. See issue #14855.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"SliceExpr", Type, 0},
    		{"SliceExpr.High", Field, 0},
    		{"SliceExpr.Lbrack", Field, 0},
    		{"SliceExpr.Low", Field, 0},
    		{"SliceExpr.Max", Field, 2},
    		{"SliceExpr.Rbrack", Field, 0},
    		{"SliceExpr.Slice3", Field, 2},
    		{"SliceExpr.X", Field, 0},
    		{"SortImports", Func, 0},
    		{"Spec", Type, 0},
    		{"StarExpr", Type, 0},
    		{"StarExpr.Star", Field, 0},
    		{"StarExpr.X", Field, 0},
    		{"Stmt", Type, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top