Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 287 for rand_r (0.17 sec)

  1. src/runtime/rand.go

    	return uint32(rand())
    }
    
    // rand returns a random uint64 from the per-m chacha8 state.
    // Do not change signature: used via linkname from other packages.
    //
    //go:nosplit
    //go:linkname rand
    func rand() uint64 {
    	// Note: We avoid acquirem here so that in the fast path
    	// there is just a getg, an inlined c.Next, and a return.
    	// The performance difference on a 16-core AMD is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 14:32:47 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. src/math/rand/v2/rand.go

    type Source interface {
    	Uint64() uint64
    }
    
    // A Rand is a source of random numbers.
    type Rand struct {
    	src Source
    }
    
    // New returns a new Rand that uses random values from src
    // to generate other random values.
    func New(src Source) *Rand {
    	return &Rand{src: src}
    }
    
    // Int64 returns a non-negative pseudo-random 63-bit integer as an int64.
    func (r *Rand) Int64() int64 { return int64(r.src.Uint64() &^ (1 << 63)) }
    
    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

    	readPos int8
    }
    
    // New returns a new [Rand] that uses random values from src
    // to generate other random values.
    func New(src Source) *Rand {
    	s64, _ := src.(Source64)
    	return &Rand{src: src, s64: s64}
    }
    
    // Seed uses the provided seed value to initialize the generator to a deterministic state.
    // Seed should not be called concurrently with any other [Rand] method.
    func (r *Rand) Seed(seed int64) {
    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/vendor/github.com/google/pprof/internal/driver/webui.go

    		ln, err := net.Listen("tcp", net.JoinHostPort(host, "0"))
    		if err != nil {
    			return "", 0, fmt.Errorf("could not generate random port: %v", err)
    		}
    		port = ln.Addr().(*net.TCPAddr).Port
    		err = ln.Close()
    		if err != nil {
    			return "", 0, fmt.Errorf("could not generate random port: %v", err)
    		}
    	} else {
    		port, err = strconv.Atoi(portStr)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 14K bytes
    - Viewed (0)
  5. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/annotations/KtAnnotationValueRenderer.kt

    import org.jetbrains.kotlin.analysis.api.types.KaStarTypeProjection
    import org.jetbrains.kotlin.analysis.api.types.KaTypeArgumentWithVariance
    import org.jetbrains.kotlin.renderer.render
    
    internal object KaAnnotationValueRenderer {
        fun render(value: KaAnnotationValue): String = buildString {
            renderConstantValue(value)
        }
    
        private fun StringBuilder.renderConstantValue(value: KaAnnotationValue) {
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/testUtils.kt

                append(")")
                append(": ${returnType.render()}")
            }
            is KaValueParameterSymbol -> "${if (isVararg) "vararg " else ""}$name: ${returnType.render()}"
            is KaTypeParameterSymbol -> this.nameOrAnonymous.asString()
            is KaVariableSymbol -> "${if (isVal) "val" else "var"} $name: ${returnType.render()}"
            is KaClassLikeSymbol -> classId?.toString() ?: nameOrAnonymous.asString()
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed Jun 05 16:16:39 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  7. src/crypto/rsa/pkcs1v15.go

    	return valid, em, index, nil
    }
    
    // nonZeroRandomBytes fills the given slice with non-zero random octets.
    func nonZeroRandomBytes(s []byte, random io.Reader) (err error) {
    	_, err = io.ReadFull(random, s)
    	if err != nil {
    		return
    	}
    
    	for i := 0; i < len(s); i++ {
    		for s[i] == 0 {
    			_, err = io.ReadFull(random, s[i:i+1])
    			if err != nil {
    				return
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:21 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  8. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/components/KtSymbolDeclarationRendererProvider.kt

        /**
         * Render symbol into the representable Kotlin string
         */
        public fun KaDeclarationSymbol.render(renderer: KaDeclarationRenderer = KaDeclarationRendererForSource.WITH_QUALIFIED_NAMES): String =
            withValidityAssertion { analysisSession.symbolDeclarationRendererProvider.renderDeclaration(this, renderer) }
    
        /**
         * Render kotlin type into the representable Kotlin type string
         */
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:35 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  9. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/renderer/types/renderers/KtClassTypeQualifierRenderer.kt

    import org.jetbrains.kotlin.analysis.api.types.KaType
    import org.jetbrains.kotlin.analysis.utils.printer.PrettyPrinter
    import org.jetbrains.kotlin.name.CallableId
    import org.jetbrains.kotlin.renderer.render
    
    public interface KaClassTypeQualifierRenderer {
        public fun renderClassTypeQualifier(
            analysisSession: KaSession,
            type: KaType,
            qualifiers: List<KaClassTypeQualifier>,
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 04 08:26:19 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/AbstractFileImportingScopeContextTest.kt

            analyseForTest(mainFile) {
                val ktScopeContext = mainFile.getImportingScopeContext()
    
                val scopeContextStringRepresentation = render(ktScopeContext, renderDefaultImportingScope)
                val scopeContextStringRepresentationPretty = render(ktScopeContext, renderDefaultImportingScope, printPretty = true)
    
                testServices.assertions.assertEqualsToTestDataFileSibling(scopeContextStringRepresentation)
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 2.7K bytes
    - Viewed (0)
Back to top