Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 163 for setTypes (0.15 sec)

  1. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/TestBuildCache.groovy

        }
    
        interface TestCacheEntry {
            String getKey()
            String getMd5Hash()
            String getText()
            void setText(String text)
            byte[] getBytes()
            void setBytes(byte[] bytes)
            void copyBytesTo(TestFile file)
        }
    
        private class TestFileCacheEntry implements TestCacheEntry {
    
            String key
            TestFile file
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  2. src/encoding/hex/hex_test.go

    		b.Run(fmt.Sprintf("%v", size), func(b *testing.B) {
    			b.SetBytes(int64(size))
    			for i := 0; i < b.N; i++ {
    				Decode(sink, src)
    			}
    		})
    	}
    }
    
    func BenchmarkDecodeString(b *testing.B) {
    	for _, size := range []int{256, 1024, 4096, 16384} {
    		src := strings.Repeat("2b744faa", size/8)
    		b.Run(fmt.Sprintf("%v", size), func(b *testing.B) {
    			b.SetBytes(int64(size))
    			for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:30:23 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. src/cmd/internal/goobj/objfile_test.go

    	var buf bytes.Buffer
    	w := dummyWriter(&buf)
    
    	var s Sym
    	s.SetABI(1)
    	s.SetType(uint8(objabi.STEXT))
    	s.SetFlag(0x12)
    	s.SetSiz(12345)
    	s.SetAlign(8)
    	s.Write(w)
    
    	var r Reloc
    	r.SetOff(12)
    	r.SetSiz(4)
    	r.SetType(uint16(objabi.R_ADDR))
    	r.SetAdd(54321)
    	r.SetSym(SymRef{11, 22})
    	r.Write(w)
    
    	var a Aux
    	a.SetType(AuxFuncInfo)
    	a.SetSym(SymRef{33, 44})
    	a.Write(w)
    
    	w.wr.Flush()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:22:12 UTC 2022
    - 3K bytes
    - Viewed (0)
  4. src/crypto/rand/util.go

    			bytes[0] |= 1
    			if len(bytes) > 1 {
    				bytes[1] |= 0x80
    			}
    		}
    		// Make the value odd since an even number this large certainly isn't prime.
    		bytes[len(bytes)-1] |= 1
    
    		p.SetBytes(bytes)
    		if p.ProbablyPrime(20) {
    			return p, nil
    		}
    	}
    }
    
    // Int returns a uniform random value in [0, max). It panics if max <= 0.
    func Int(rand io.Reader, max *big.Int) (n *big.Int, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  5. src/math/big/ratmarsh.go

    		return errors.New("Rat.GobDecode: invalid length")
    	}
    	i := j + int(ln)
    	if len(buf) < i {
    		return errors.New("Rat.GobDecode: buffer too small")
    	}
    	z.a.neg = b&1 != 0
    	z.a.abs = z.a.abs.setBytes(buf[j:i])
    	z.b.abs = z.b.abs.setBytes(buf[i:])
    	return nil
    }
    
    // MarshalText implements the [encoding.TextMarshaler] interface.
    func (x *Rat) MarshalText() (text []byte, err error) {
    	if x.IsInt() {
    		return x.a.MarshalText()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. src/hash/maphash/maphash_test.go

    	b.Run("Write", func(b *testing.B) {
    		b.SetBytes(int64(size))
    		for i := 0; i < b.N; i++ {
    			h.Reset()
    			h.Write(buf)
    			h.Sum64()
    		}
    	})
    
    	b.Run("Bytes", func(b *testing.B) {
    		b.SetBytes(int64(size))
    		seed := h.Seed()
    		for i := 0; i < b.N; i++ {
    			Bytes(seed, buf)
    		}
    	})
    
    	b.Run("String", func(b *testing.B) {
    		b.SetBytes(int64(size))
    		seed := h.Seed()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  7. src/crypto/internal/nistec/fiat/generate.go

    	{{ .Prefix }}InvertEndianness(out[:])
    	return out[:]
    }
    
    // SetBytes sets e = v, where v is a big-endian {{ .BytesLen }}-byte encoding, and returns e.
    // If v is not {{ .BytesLen }} bytes or it encodes a value higher than {{ .Prime }},
    // SetBytes returns nil and an error, and e is unchanged.
    func (e *{{ .Element }}) SetBytes(v []byte) (*{{ .Element }}, error) {
    	if len(v) != {{ .Prefix }}ElementLen {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 12 00:04:29 UTC 2022
    - 9.1K bytes
    - Viewed (0)
  8. src/crypto/ecdh/nist.go

    	}
    	if boring.Enabled {
    		bk, err := boring.NewPublicKeyECDH(c.name, k.publicKey)
    		if err != nil {
    			return nil, err
    		}
    		k.boring = bk
    	} else {
    		// SetBytes also checks that the point is on the curve.
    		if _, err := c.newPoint().SetBytes(key); err != nil {
    			return nil, err
    		}
    	}
    	return k, nil
    }
    
    func (c *nistCurve[Point]) ecdh(local *PrivateKey, remote *PublicKey) ([]byte, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  9. src/crypto/elliptic/nistec_p256.go

    	}
    	scalar := k.FillBytes(make([]byte, 32))
    	inverse, err := nistec.P256OrdInverse(scalar)
    	if err != nil {
    		panic("crypto/elliptic: nistec rejected normalized scalar")
    	}
    	return new(big.Int).SetBytes(inverse)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 05 21:53:03 UTC 2022
    - 696 bytes
    - Viewed (0)
  10. src/go/doc/testdata/testing.0.golden

    	func (c *B) Logf(format string, args ...any)
    
    	// ResetTimer sets the elapsed benchmark time to zero. It does not ...
    	func (b *B) ResetTimer()
    
    	// SetBytes records the number of bytes processed in a single ...
    	func (b *B) SetBytes(n int64)
    
    	// StartTimer starts timing a test. This function is called ...
    	func (b *B) StartTimer()
    
    	// StopTimer stops timing a test. This can be used to pause the ...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 4.1K bytes
    - Viewed (0)
Back to top