Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for sliceok3 (0.19 sec)

  1. src/cmd/cgo/internal/testerrors/ptr_test.go

    	},
    	{
    		// Passing the address of a slice of an array that is
    		// an element in a struct, with a type conversion.
    		name:    "sliceok3",
    		c:       `void f10(void* p) {}`,
    		imports: []string{"unsafe"},
    		support: `type S10 struct { p *int; a [4]byte }`,
    		body:    `i := 0; p := &S10{p:&i}; s := p.a[:]; C.f10(unsafe.Pointer(&s[0]))`,
    		fail:    false,
    	},
    	{
    		// Passing the address of a slice of an array that is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 16:07:49 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  2. test/escape_slice.go

    	s = make([]int, i, 1)  // ERROR "make\(\[\]int, i, 1\) does not escape"
    	_ = s
    }
    
    func slice12(x []int) *[1]int { // ERROR "leaking param: x to result ~r0 level=0$"
    	return (*[1]int)(x)
    }
    
    func slice13(x []*int) [1]*int { // ERROR "leaking param: x to result ~r0 level=1$"
    	return [1]*int(x)
    }
    
    func envForDir(dir string) []string { // ERROR "dir does not escape"
    	env := os.Environ()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  3. test/typeparam/append.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    type Recv <-chan int
    
    type sliceOf[E any] interface {
    	~[]E
    }
    
    func _Append[S sliceOf[T], T any](s S, t ...T) S {
    	return append(s, t...)
    }
    
    func main() {
    	recv := make(Recv)
    	a := _Append([]Recv{recv}, recv)
    	if len(a) != 2 || a[0] != recv || a[1] != recv {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 597 bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.h

                                    PatternRewriter& rewriter) const override;
    };
    
    // Pad slice to 4d.
    struct PadSlice : public OpRewritePattern<TFL::SliceOp> {
      using OpRewritePattern<TFL::SliceOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(TFL::SliceOp slice_op,
                                    PatternRewriter& rewriter) const override;
    };
    
    // Fully connected to conv2d.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 03 16:37:16 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  5. 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)
  6. src/cmd/internal/bio/buf_nommap.go

    // Copyright 2019 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !unix
    
    package bio
    
    func (r *Reader) sliceOS(length uint64) ([]byte, bool) {
    	return nil, false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 269 bytes
    - Viewed (0)
  7. callbacks/associations.go

    				isPtr := fieldType.Kind() == reflect.Ptr
    				if !isPtr {
    					fieldType = reflect.PtrTo(fieldType)
    				}
    				elems := reflect.MakeSlice(reflect.SliceOf(fieldType), 0, 10)
    				distinctElems := reflect.MakeSlice(reflect.SliceOf(fieldType), 0, 10)
    				joins := reflect.MakeSlice(reflect.SliceOf(reflect.PtrTo(rel.JoinTable.ModelType)), 0, 10)
    				objs := []reflect.Value{}
    
    				appendToJoins := func(obj reflect.Value, elem reflect.Value) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Apr 11 03:06:13 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tf_xla_op_to_tf_op.cc

    }
    
    // Determines the output type of the `SliceOp` when it is being inserted in
    // place of a `XlaGatherOp`. When the dimensions of `xla_gather_op_output_type`
    // is known, the `collapsed_dims` are restored. `xla_gather_op_output_type` is
    // the result of collapsing the `collapsed_dims`, but the `SliceOp`'s output
    // should not have the dimensions collapsed already. Returns
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec.cc

                    mlir::stablehlo::ReshapeOp, mlir::stablehlo::SelectOp,
                    mlir::stablehlo::SliceOp, mlir::stablehlo::TransposeOp>(op)) {
        scale_spec->has_same_scale_requirement = true;
      }
      if (llvm::isa<mlir::stablehlo::DynamicSliceOp, mlir::stablehlo::GatherOp,
                    mlir::stablehlo::PadOp, mlir::stablehlo::SliceOp>(op)) {
        scale_spec->has_same_operand_and_result_type_requirement = true;
      }
      return scale_spec;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

      slice_size[0] = 1;
      auto size_const = GetR1Const(slice_size, builder, loc);
      auto slice_type = tensorflow::GetTypeFromTFTensorShape(
          slice_size, buffer_type.getElementType());
      auto slice = builder.create<TF::SliceOp>(
          loc, ArrayRef<Type>{slice_type},
          ArrayRef<Value>{buffer, GetIndicesForElement(index, buffer, builder, loc),
                          size_const});
      if (keep_slice_shape) return slice;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
Back to top