Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 652 for ptr (0.02 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/recv.go

    // It also reports whether a Pointer was present.
    func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) {
    	t := recv.Type()
    	if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
    		isPtr = true
    		t = ptr.Elem()
    	}
    	named, _ = aliases.Unalias(t).(*types.Named)
    	return
    }
    
    // Unpointer returns T given *T or an alias thereof.
    // For all other types it is the identity function.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/xla_device_ops.cc

                                  context, HandleFromInput(context, 0), &variable,
                                  [this, &value](Var** ptr) {
                                    *ptr = new Var(dtype_);
                                    *(*ptr)->tensor() = value;
                                    (*ptr)->is_initialized = true;
                                    return absl::OkStatus();
                                  }));
      mutex_lock ml(*variable->mu());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/rewrite386.go

    		x := y.Args[0]
    		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
    			break
    		}
    		v.reset(Op386ADDLmodify)
    		v.AuxInt = int32ToAuxInt(off)
    		v.Aux = symToAux(sym)
    		v.AddArg3(ptr, x, mem)
    		return true
    	}
    	// match: (MOVLstore {sym} [off] ptr y:(ANDLload x [off] {sym} ptr mem) mem)
    	// cond: y.Uses==1 && clobber(y)
    	// result: (ANDLmodify [off] {sym} ptr x mem)
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 21:05:46 UTC 2023
    - 262.4K bytes
    - Viewed (0)
  4. src/internal/weak/pointer.go

    }
    
    // Make creates a weak pointer from a strong pointer to some value of type T.
    func Make[T any](ptr *T) Pointer[T] {
    	// Explicitly force ptr to escape to the heap.
    	ptr = abi.Escape(ptr)
    
    	var u unsafe.Pointer
    	if ptr != nil {
    		u = runtime_registerWeakPointer(unsafe.Pointer(ptr))
    	}
    	runtime.KeepAlive(ptr)
    	return Pointer[T]{u}
    }
    
    // Strong creates a strong pointer from the weak pointer.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:13:25 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. pkg/kube/krt/helpers.go

    // If there is none, this will return nil.
    func GetApplyConfigKey[O any](a O) *Key[O] {
    	// Reflection is expensive; short circuit here
    	if !strings.HasSuffix(ptr.TypeName[O](), "ApplyConfiguration") {
    		return nil
    	}
    	val := reflect.ValueOf(a)
    
    	if val.Kind() == reflect.Ptr {
    		val = val.Elem()
    	}
    	if val.Kind() != reflect.Struct {
    		return nil
    	}
    
    	specField := val.FieldByName("ObjectMetaApplyConfiguration")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. src/runtime/pinner.go

    					pinnerLeakPanic()
    				}
    			})
    		}
    	}
    	ptr := pinnerGetPtr(&pointer)
    	if setPinned(ptr, true) {
    		p.refs = append(p.refs, ptr)
    	}
    }
    
    // Unpin unpins all pinned objects of the [Pinner].
    func (p *Pinner) Unpin() {
    	p.pinner.unpin()
    
    	mp := acquirem()
    	if pp := mp.p.ptr(); pp != nil && pp.pinnerCache == nil {
    		// Put the pinner back in the cache, but only if the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. test/escape_sync_atomic.go

    	return atomic.LoadPointer(addr)
    }
    
    var ptr unsafe.Pointer
    
    func StorePointer() {
    	var x int // ERROR "moved to heap: x"
    	atomic.StorePointer(&ptr, unsafe.Pointer(&x))
    }
    
    func SwapPointer() {
    	var x int // ERROR "moved to heap: x"
    	atomic.SwapPointer(&ptr, unsafe.Pointer(&x))
    }
    
    func CompareAndSwapPointer() {
    	// BAD: x doesn't need to be heap allocated
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 19:09:15 UTC 2019
    - 943 bytes
    - Viewed (0)
  8. pkg/registry/storage/csinode/strategy_test.go

    	"testing"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/util/validation/field"
    	genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
    	"k8s.io/kubernetes/pkg/apis/storage"
    	ptr "k8s.io/utils/ptr"
    )
    
    func TestPrepareForCreate(t *testing.T) {
    	valid := getValidCSINode("foo")
    	emptyAllocatable := &storage.CSINode{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: "foo",
    		},
    		Spec: storage.CSINodeSpec{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 09:24:44 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. src/internal/reflectlite/export_test.go

    		}
    	}
    	// Either flagIndir is set and v.ptr points at struct,
    	// or flagIndir is not set and v.ptr is the actual struct data.
    	// In the former case, we want v.ptr + offset.
    	// In the latter case, we must have field.offset = 0,
    	// so v.ptr + field.offset is still the correct address.
    	ptr := add(v.ptr, field.Offset, "same as non-reflect &v.field")
    	return Value{typ, ptr, fl}
    }
    
    func TField(typ Type, i int) Type {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. src/runtime/gcinfo_test.go

    	verifyGCInfo(t, "data slice", &dataSlice, infoSlice)
    	verifyGCInfo(t, "data eface", &dataEface, infoEface)
    	verifyGCInfo(t, "data iface", &dataIface, infoIface)
    
    	{
    		var x Ptr
    		verifyGCInfo(t, "stack Ptr", &x, infoPtr)
    		runtime.KeepAlive(x)
    	}
    	{
    		var x ScalarPtr
    		verifyGCInfo(t, "stack ScalarPtr", &x, infoScalarPtr)
    		runtime.KeepAlive(x)
    	}
    	{
    		var x PtrScalar
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:58:08 UTC 2023
    - 6K bytes
    - Viewed (0)
Back to top