Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Fastrandn (0.1 sec)

  1. src/runtime/export_test.go

    		if s.state.get() == mSpanInUse {
    			counted += s.npages
    		}
    	}
    
    	startTheWorld(stw)
    
    	return
    }
    
    func Fastrand() uint32          { return uint32(rand()) }
    func Fastrand64() uint64        { return rand() }
    func Fastrandn(n uint32) uint32 { return randn(n) }
    
    type ProfBuf profBuf
    
    func NewProfBuf(hdrsize, bufwords, tags int) *ProfBuf {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  2. src/math/rand/v2/rand.go

    // convenience functions.
    var globalRand = &Rand{src: runtimeSource{}}
    
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    // runtimeSource is a Source that uses the runtime fastrand functions.
    type runtimeSource struct{}
    
    func (runtimeSource) Uint64() uint64 {
    	return runtime_rand()
    }
    
    // Int64 returns a non-negative pseudo-random 63-bit integer as an int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:25:49 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  3. src/math/rand/rand.go

    		return globalRandGenerator.Load()
    	}
    
    	return r
    }
    
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    // runtimeSource is an implementation of Source64 that uses the runtime
    // fastrand functions.
    type runtimeSource struct {
    	// The mutex is used to avoid race conditions in Read.
    	mu sync.Mutex
    }
    
    func (*runtimeSource) Int63() int64 {
    	return int64(runtime_rand() & rngMask)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  4. src/cmd/link/link_test.go

    		{"coro_var.go", false},
    		// assembly reference is not ok
    		{"coro_asm", false},
    		// pull-only linkname is not ok
    		{"coro2.go", false},
    		// legacy bad linkname is ok, for now
    		{"fastrand.go", true},
    		{"badlinkname.go", true},
    	}
    	for _, test := range tests {
    		test := test
    		t.Run(test.src, func(t *testing.T) {
    			t.Parallel()
    			src := filepath.Join("testdata", "linkname", test.src)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 20:26:02 UTC 2024
    - 43.5K bytes
    - Viewed (0)
Back to top