Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for sliceok2 (0.23 sec)

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

    		body:    `i := 0; s := []unsafe.Pointer{nil, unsafe.Pointer(&i)}; C.f8(&s[0])`,
    		fail:    true,
    	},
    	{
    		// Passing the address of a slice that is an element
    		// in a struct only looks at the slice.
    		name:    "sliceok2",
    		c:       `void f9(void **p) {}`,
    		imports: []string{"unsafe"},
    		support: `type S9 struct { p *int; s []unsafe.Pointer }`,
    		body:    `i := 0; p := &S9{p:&i, s:[]unsafe.Pointer{nil}}; C.f9(&p.s[0])`,
    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/sliceopt.go

    Austin Clements <******@****.***> 1515619738 -0500
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 08 22:25:25 UTC 2018
    - 735 bytes
    - Viewed (0)
  3. test/escape_slice.go

    	s = make([]int, i, 3)  // ERROR "make\(\[\]int, i, 3\) does not escape"
    	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)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 3.9K 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. 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)
  6. 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)
  7. 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)
  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. test/fixedbugs/issue30606.go

    var x = reflect.New(reflect.StructOf([]reflect.StructField{
    	{Name: "F5", Type: reflect.StructOf([]reflect.StructField{
    		{Name: "F4", Type: reflect.ArrayOf(5462,
    			reflect.SliceOf(typ(uint64(0))))},
    	})},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 20:22:14 UTC 2019
    - 502 bytes
    - Viewed (0)
  10. src/cmd/internal/bio/buf.go

    // backing memory is read-only.
    func (r *Reader) Slice(length uint64) ([]byte, bool, error) {
    	if length == 0 {
    		return []byte{}, false, nil
    	}
    
    	data, ok := r.sliceOS(length)
    	if ok {
    		return data, true, nil
    	}
    
    	data = make([]byte, length)
    	_, err := io.ReadFull(r, data)
    	if err != nil {
    		return nil, false, err
    	}
    	return data, false, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 11 17:15:15 UTC 2020
    - 3.1K bytes
    - Viewed (0)
Back to top