- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 52 for WordSize (0.25 sec)
-
src/cmd/compile/internal/types2/sizes_test.go
s string n int } ` ts := findStructType(t, src) sizes := types2.StdSizes{WordSize: 4, MaxAlign: 4} if got := sizes.Sizeof(ts); got != 20 { t.Errorf("Sizeof(%v) with WordSize 4 = %d want 20", ts, got) } sizes = types2.StdSizes{WordSize: 8, MaxAlign: 8} if got := sizes.Sizeof(ts); got != 40 { t.Errorf("Sizeof(%v) with WordSize 8 = %d want 40", ts, got) } } // go.dev/issue/16464
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 16 21:00:48 UTC 2023 - 4.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/gcsizes.go
// Multiword data structures are effectively structs // in which each element has size WordSize. // Type parameters lead to variable sizes/alignments; // StdSizes.Alignof won't be called for them. assert(!isTypeParam(T)) return s.WordSize case *Basic: // Strings are like slices and interfaces. if t.Info()&IsString != 0 { return s.WordSize } case *TypeParam, *Union: panic("unreachable") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 4.2K bytes - Viewed (0) -
src/crypto/subtle/xor_generic.go
if uintptr(n)%wordSize == 0 { return } done := n &^ int(wordSize-1) dst = dst[done:] x = x[done:] y = y[done:] } xorLoop(dst, x, y) } // aligned reports whether dst, x, and y are all word-aligned pointers. func aligned(dst, x, y *byte) bool { return (uintptr(unsafe.Pointer(dst))|uintptr(unsafe.Pointer(x))|uintptr(unsafe.Pointer(y)))&(wordSize-1) == 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 31 23:25:07 UTC 2023 - 1.7K bytes - Viewed (0) -
src/go/types/gcsizes.go
// Multiword data structures are effectively structs // in which each element has size WordSize. // Type parameters lead to variable sizes/alignments; // StdSizes.Alignof won't be called for them. assert(!isTypeParam(T)) return s.WordSize case *Basic: // Strings are like slices and interfaces. if t.Info()&IsString != 0 { return s.WordSize } case *TypeParam, *Union: panic("unreachable") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 4.4K bytes - Viewed (0) -
src/go/types/sizes.go
// Multiword data structures are effectively structs // in which each element has size WordSize. // Type parameters lead to variable sizes/alignments; // StdSizes.Alignof won't be called for them. assert(!isTypeParam(T)) return s.WordSize case *Basic: // Strings are like slices and interfaces. if t.Info()&IsString != 0 { return s.WordSize } case *TypeParam, *Union: panic("unreachable") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 8.9K bytes - Viewed (0) -
src/go/types/sizes_test.go
s string n int } ` ts := findStructType(t, src) sizes := types.StdSizes{WordSize: 4, MaxAlign: 4} if got := sizes.Sizeof(ts); got != 20 { t.Errorf("Sizeof(%v) with WordSize 4 = %d want 20", ts, got) } sizes = types.StdSizes{WordSize: 8, MaxAlign: 8} if got := sizes.Sizeof(ts); got != 40 { t.Errorf("Sizeof(%v) with WordSize 8 = %d want 40", ts, got) } } // go.dev/issue/16464
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 16 21:00:48 UTC 2023 - 4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/sizes.go
// Multiword data structures are effectively structs // in which each element has size WordSize. // Type parameters lead to variable sizes/alignments; // StdSizes.Alignof won't be called for them. assert(!isTypeParam(T)) return s.WordSize case *Basic: // Strings are like slices and interfaces. if t.Info()&IsString != 0 { return s.WordSize } case *TypeParam, *Union: panic("unreachable") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 8.8K bytes - Viewed (0) -
src/vendor/golang.org/x/net/route/sys_freebsd.go
}, } } var compatFreeBSD32 bool // 386 emulation on amd64 func probeRoutingStack() (int, map[int]*wireFormat) { var p uintptr wordSize := int(unsafe.Sizeof(p)) align := wordSize // In the case of kern.supported_archs="amd64 i386", we need // to know the underlying kernel's architecture because the // alignment for routing facilities are set at the build time // of the kernel.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 05 19:54:32 UTC 2022 - 4.7K bytes - Viewed (0) -
src/cmd/link/internal/ld/ar.go
type archiveMap map[string]uint64 // readArmap reads the archive symbol map. func readArmap(filename string, f *bio.Reader, arhdr ArHdr) archiveMap { is64 := arhdr.name == "/SYM64/" wordSize := 4 if is64 { wordSize = 8 } contents := make([]byte, atolwhex(arhdr.size)) if _, err := io.ReadFull(f, contents); err != nil { Exitf("short read from %s", filename) } var c uint64 if is64 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Nov 19 23:11:11 UTC 2022 - 7.2K bytes - Viewed (0) -
test/fibo.go
fmt.Printf("error: got std fibo(%d) = %s; want %s\n", test.n, got, test.want) os.Exit(1) } } } func selfTest() { if W != 32 && W != 64 { fmt.Printf("error: unexpected wordsize %d", W) os.Exit(1) } for i := 0; i < 4; i++ { test(i&2 == 0, i&1 != 0) } } func doFibo(n int) { start := time.Now() f := fibo(n, *half, *opt) t := time.Since(start)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 08 22:22:58 UTC 2014 - 6.3K bytes - Viewed (0)