- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 319 for newInt (0.14 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/cache_test.go
want := sets.NewInt() startCh := make(chan struct{}) wg := sync.WaitGroup{} for i := 0; i < 100; i++ { want.Insert(i + 1) k := fmt.Sprintf("key-%d", i) wg.Add(1) go func(key string) { defer wg.Done() <-startCh cache.set([]byte(key), transformer) }(k) } close(startCh) wg.Wait() got := sets.NewInt() record.Range(func(key, value any) bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 31 20:26:58 UTC 2023 - 4.9K bytes - Viewed (0) -
src/cmd/compile/internal/walk/complit.go
lhs.RType = n.RType zero := ir.NewAssignStmt(base.Pos, i, ir.NewInt(base.Pos, 0)) cond := ir.NewBinaryExpr(base.Pos, ir.OLT, i, ir.NewInt(base.Pos, tk.NumElem())) incr := ir.NewAssignStmt(base.Pos, i, ir.NewBinaryExpr(base.Pos, ir.OADD, i, ir.NewInt(base.Pos, 1))) var body ir.Node = ir.NewAssignStmt(base.Pos, lhs, rhs) body = typecheck.Stmt(body)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
pkg/controller/certificates/authority/authority.go
limitations under the License. */ package authority import ( "crypto" "crypto/rand" "crypto/x509" "fmt" "math/big" ) var serialNumberLimit = new(big.Int).Lsh(big.NewInt(1), 128) // CertificateAuthority implements a certificate authority that supports policy // based signing. It's used by the signing controller. type CertificateAuthority struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 23 19:36:11 UTC 2021 - 2.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/switch.go
func(i int) ir.Node { return ir.NewBinaryExpr(base.Pos, ir.OLE, s.hashName, ir.NewInt(base.Pos, int64(cc[i-1].hash))) }, func(i int, nif *ir.IfStmt) { // TODO(mdempsky): Omit hash equality check if // there's only one type. c := cc[i] nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OEQ, s.hashName, ir.NewInt(base.Pos, int64(c.hash))) nif.Body.Append(c.body.Take()...) }, ) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 30.1K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
ptr2, len2 := backingArrayPtrLen(l2) fn := typecheck.LookupRuntime("slicecopy", ptr1.Type().Elem(), ptr2.Type().Elem()) ncopy = mkcall1(fn, types.Types[types.TINT], &nodes, ptr1, len1, ptr2, len2, ir.NewInt(base.Pos, elemtype.Size())) } else { // memmove(&s[idx], &l2[0], len(l2)*sizeof(T)) ix := ir.NewIndexExpr(base.Pos, s, idx) ix.SetBounded(true) addr := typecheck.NodAddr(ix)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/resource/scale_int.go
limitations under the License. */ package resource import ( "math" "math/big" "sync" ) var ( // A sync pool to reduce allocation. intPool sync.Pool maxInt64 = big.NewInt(math.MaxInt64) ) func init() { intPool.New = func() interface{} { return &big.Int{} } } // scaledValue scales given unscaled value from scale to new Scale and returns
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jan 29 20:41:44 UTC 2017 - 2.5K bytes - Viewed (0) -
src/cmd/compile/internal/test/testdata/gen/cmpConstGen.go
default: panic("unexpected type") } return cmp(min, "<=", val) && cmp(val, "<=", max) } func getValues(typ string) []*big.Int { Uint := func(v uint64) *big.Int { return big.NewInt(0).SetUint64(v) } Int := func(v int64) *big.Int { return big.NewInt(0).SetInt64(v) } values := []*big.Int{ // limits Uint(maxU64), Uint(maxU64 - 1), Uint(maxI64 + 1), Uint(maxI64), Uint(maxI64 - 1), Uint(maxU32 + 1),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 20 02:13:02 UTC 2022 - 6.4K bytes - Viewed (0) -
pkg/registry/core/service/allocator/bitmap.go
a := AllocationBitmap{ strategy: randomScanStrategyWithOffset{ rand: rand.New(rand.NewSource(time.Now().UnixNano())), offset: offset, }, allocated: big.NewInt(0), count: 0, max: max, rangeSpec: rangeSpec, } return &a } // Allocate attempts to reserve the provided item. // Returns true if it was allocated, false if it was already in use
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 25 20:32:40 UTC 2023 - 7.6K bytes - Viewed (0) -
pkg/test/csrctrl/authority/authority.go
// limitations under the License. package authority import ( "crypto" "crypto/rand" "crypto/x509" "fmt" "math/big" "time" ) var serialNumberLimit = new(big.Int).Lsh(big.NewInt(1), 128) // CertificateAuthority implements a certificate authority that supports policy // based signing. It's used by the signing controller. type CertificateAuthority struct {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jul 28 18:22:37 UTC 2021 - 3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/magic.go
d := uint64(c) << (64 - n) >> (64 - n) C := new(big.Int).SetUint64(d) s := C.BitLen() M := big.NewInt(1) M.Lsh(M, n+uint(s)) // 2^(n+s) M.Add(M, C) // 2^(n+s)+c M.Sub(M, big.NewInt(1)) // 2^(n+s)+c-1 M.Div(M, C) // ⎡2^(n+s)/c⎤ if M.Bit(int(n)) != 1 { panic("n+1st bit isn't set") } M.SetBit(M, int(n), 0) m := M.Uint64()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:25 UTC 2024 - 15.8K bytes - Viewed (0)