Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for intSize (0.2 sec)

  1. src/math/const.go

    )
    
    // Integer limit values.
    const (
    	intSize = 32 << (^uint(0) >> 63) // 32 or 64
    
    	MaxInt    = 1<<(intSize-1) - 1  // MaxInt32 or MaxInt64 depending on intSize.
    	MinInt    = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize.
    	MaxInt8   = 1<<7 - 1            // 127
    	MinInt8   = -1 << 7             // -128
    	MaxInt16  = 1<<15 - 1           // 32767
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 21 14:07:39 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  2. test/fixedbugs/issue21887.go

    // license that can be found in the LICENSE file.
    
    // Issue 21887: println(^uint(0)) fails to compile
    
    package main
    
    import "strconv"
    
    func main() {
    	if strconv.IntSize == 32 {
    		println(^uint(0))
    	} else {
    		println(^uint32(0))
    	}
    
    	if strconv.IntSize == 64 {
    		println(^uint(0))
    	} else {
    		println(^uint64(0))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 31 17:36:45 UTC 2018
    - 435 bytes
    - Viewed (0)
  3. test/fixedbugs/issue16016.go

    	if runtime.Compiler == "gccgo" {
    		// On targets without split-stack libgo allocates
    		// a large stack for each goroutine. On 32-bit
    		// systems this test can run out of memory.
    		const intSize = 32 << (^uint(0) >> 63) // 32 or 64
    		if intSize < 64 {
    			count = 100
    		}
    	}
    
    	var q Q = &R{&T{}}
    	for i := 0; i < count; i++ {
    		go func() {
    			defer q.Foo([]interface{}{"meow"})
    			time.Sleep(100 * time.Millisecond)
    		}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:39:06 UTC 2024
    - 877 bytes
    - Viewed (0)
  4. src/image/png/paeth.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package png
    
    // intSize is either 32 or 64.
    const intSize = 32 << (^uint(0) >> 63)
    
    func abs(x int) int {
    	// m := -1 if x < 0. m := 0 otherwise.
    	m := x >> (intSize - 1)
    
    	// In two's complement representation, the negative number
    	// of any number (except the smallest one) can be computed
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 1.7K bytes
    - Viewed (0)
  5. src/strconv/atoi.go

    func bitSizeError(fn, str string, bitSize int) *NumError {
    	return &NumError{fn, stringslite.Clone(str), errors.New("invalid bit size " + Itoa(bitSize))}
    }
    
    const intSize = 32 << (^uint(0) >> 63)
    
    // IntSize is the size in bits of an int or uint value.
    const IntSize = intSize
    
    const maxUint64 = 1<<64 - 1
    
    // ParseUint is like [ParseInt] but for unsigned numbers.
    //
    // A sign prefix is not permitted.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl/asmdecl.go

    		cc = append(cc, newComponent(suffix+"_len", asmKind(arch.intSize), "slice len", off+arch.ptrSize, arch.intSize, suffix))
    		cc = append(cc, newComponent(suffix+"_cap", asmKind(arch.intSize), "slice cap", off+arch.ptrSize+arch.intSize, arch.intSize, suffix))
    
    	case asmString:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  7. internal/grid/grid_types_msgp_test.go

    	return
    }
    
    // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
    func (z *testResponse) Msgsize() (s int) {
    	s = 1 + 7 + msgp.IntSize + 10 + msgp.StringPrefixSize + len(z.OrgString) + 9 + 1 + 4 + msgp.IntSize + 7 + msgp.StringPrefixSize + len(z.Embedded.String)
    	return
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  8. internal/bucket/replication/datatypes_gen.go

    		}
    		(*z) = Type(zb0001)
    	}
    	o = bts
    	return
    }
    
    // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
    func (z Type) Msgsize() (s int) {
    	s = msgp.IntSize
    	return
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Mar 08 19:08:18 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  9. cmd/local-locker_gen.go

    		}
    	}
    	o = bts
    	return
    }
    
    // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
    func (z lockStats) Msgsize() (s int) {
    	s = 1 + 6 + msgp.IntSize + 7 + msgp.IntSize + 6 + msgp.IntSize
    	return
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Mar 21 17:21:35 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  10. src/strconv/atoi_test.go

    			t.Errorf("ParseInt(%q, %v, 64) = %v, %v want %v, %v",
    				test.in, test.base, out, err, test.out, test.err)
    		}
    	}
    }
    
    func TestParseUint(t *testing.T) {
    	switch IntSize {
    	case 32:
    		for i := range parseUint32Tests {
    			test := &parseUint32Tests[i]
    			out, err := ParseUint(test.in, 10, 0)
    			if uint64(test.out) != out || !reflect.DeepEqual(test.err, err) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 21 05:09:21 UTC 2023
    - 17.1K bytes
    - Viewed (0)
Back to top