Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for IsSlice3 (0.12 sec)

  1. src/reflect/all_test.go

    	}
    	rv = ValueOf(&xa).Elem()
    	shouldPanic("Slice3", func() { rv.Slice3(1, 2, 1) })
    	shouldPanic("Slice3", func() { rv.Slice3(1, 1, 11) })
    	shouldPanic("Slice3", func() { rv.Slice3(2, 2, 1) })
    
    	s := "hello world"
    	rv = ValueOf(&s).Elem()
    	shouldPanic("Slice3", func() { rv.Slice3(1, 2, 3) })
    
    	rv = ValueOf(&xs).Elem()
    	rv = rv.Slice3(3, 5, 7)
    	ptr2 := rv.UnsafePointer()
    	rv = rv.Slice3(4, 4, 4)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
Back to top