Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for sliceok3 (0.38 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/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/slice3.go

    Emmanuel Odeke <******@****.***> 1460323946 -0700
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 2.9K bytes
    - Viewed (0)
  4. 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)
  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. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top