- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 504 for nelem (0.06 sec)
-
test/fixedbugs/bug027.go
import "fmt" type Element interface { } type Vector struct { nelem int elem []Element } func New() *Vector { v := new(Vector) v.nelem = 0 v.elem = make([]Element, 10) return v } func (v *Vector) At(i int) Element { return v.elem[i] } func (v *Vector) Insert(e Element) { v.elem[v.nelem] = e v.nelem++ } func main() { type I struct{ val int } i0 := new(I)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:48:57 UTC 2012 - 1.2K bytes - Viewed (0) -
src/crypto/internal/boring/div_test.c
7, 8, 9, 10, 11, 31, 0xFFF, 0x1000, 0x1001, 0xF0F0F0, 0xFFFFFF, 0x1000000, 0xF0F0F0F0, 0xFFFFFFFF, }; int main(void) { for(int i=0; i<nelem(tests); i++) for(int j=0; j<nelem(tests); j++) { u32 n = tests[i]; u32 d = tests[j]; if(d == 0) continue; u32 r; u32 q = div(n, d, &r); if(q != n/d || r != n%d)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 18 21:28:09 UTC 2022 - 1.4K bytes - Viewed (0) -
test/cmplxdivide.c
printf(")\n"); printf("\n"); printf("var tests = []struct {\n"); printf("\tf, g complex128\n"); printf("\tout complex128\n"); printf("}{\n"); for(i=0; i<nelem(f); i++) for(j=0; j<nelem(f); j++) for(k=0; k<nelem(f); k++) for(l=0; l<nelem(f); l++) { n = f[i] + f[j]*I; d = f[k] + f[l]*I; q = n/d; printf("\t{complex(%s, %s), complex(%s, %s), complex(%s, %s)},\n", fmt(creal(n)), fmt(cimag(n)),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 15 22:45:17 UTC 2017 - 2.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/plan9/mkerrors.sh
} int main(void) { int i, j, e; char buf[1024], *p; printf("\n\n// Error table\n"); printf("var errors = [...]string {\n"); qsort(errors, nelem(errors), sizeof errors[0], intcmp); for(i=0; i<nelem(errors); i++) { e = errors[i]; if(i > 0 && errors[i-1] == e) continue; strcpy(buf, strerror(e)); // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 00:11:50 UTC 2022 - 5.9K bytes - Viewed (0) -
src/syscall/mkerrors.sh
} int main(void) { int i, j, e; char buf[1024], *p; printf("\n\n// Error table\n"); printf("var errors = [...]string {\n"); qsort(errors, nelem(errors), sizeof errors[0], intcmp); for(i=0; i<nelem(errors); i++) { e = errors[i]; if(i > 0 && errors[i-1] == e) continue; strcpy(buf, strerror(e)); // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 06 21:22:22 UTC 2022 - 10.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh
printf("var errorList = [...]struct {\n"); printf("\tnum syscall.Errno\n"); printf("\tname string\n"); printf("\tdesc string\n"); printf("} {\n"); qsort(errors, nelem(errors), sizeof errors[0], tuplecmp); for(i=0; i<nelem(errors); i++) { e = errors[i].num; if(i > 0 && errors[i-1].num == e) continue; strncpy(buf, strerror(e), sizeof(buf) - 1); buf[sizeof(buf) - 1] = '\0';
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 20.2K bytes - Viewed (0) -
src/runtime/cgo/libcgo.h
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <stdint.h> #include <stdlib.h> #include <stdio.h> #undef nil #define nil ((void*)0) #define nelem(x) (sizeof(x)/sizeof((x)[0])) typedef uint32_t uint32; typedef uint64_t uint64; typedef uintptr_t uintptr; /* * The beginning of the per-goroutine structure, * as defined in ../pkg/runtime/runtime.h.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 13 20:50:04 UTC 2024 - 3.5K bytes - Viewed (0) -
src/runtime/mheap.go
// then object n is free; // otherwise, object n is allocated. Bits starting at nelem are // undefined and should never be referenced. // // Object n starts at address n*elemsize + (start << pageShift). freeindex uint16 // TODO: Look up nelems from sizeclass and remove this field if it // helps performance. nelems uint16 // number of object in the span. // freeIndexForScan is like freeindex, except that freeindex is
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:31:00 UTC 2024 - 78K bytes - Viewed (0) -
src/cmd/compile/internal/staticdata/embed.go
// See the comment inside ../../../../embed/embed.go's Files struct for rationale. func embedFileLess(x, y string) bool { xdir, xelem, _ := embedFileNameSplit(x) ydir, yelem, _ := embedFileNameSplit(y) return xdir < ydir || xdir == ydir && xelem < yelem } // WriteEmbed emits the init data for a //go:embed variable, // which is either a string, a []byte, or an embed.FS. func WriteEmbed(v *ir.Name) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 10 18:22:02 UTC 2023 - 4.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/ssa.go
s.Fatalf("expected pointer type: %v", n.Type()) } elem, rtypeExpr := n.Type().Elem(), n.ElemRType if count != nil { if !elem.IsArray() { s.Fatalf("expected array type: %v", elem) } elem, rtypeExpr = elem.Elem(), n.ElemElemRType } size := elem.Size() // Casting from larger type to smaller one is ok, so for smallest type, do nothing. if elem.Alignment() == 1 && (size == 0 || size == 1 || count == nil) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 284.9K bytes - Viewed (0)