Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 148 for nelem (0.04 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. src/internal/types/testdata/check/issues1.go

    type Element2[TElem any] struct {
    	next, prev *Element2[TElem]
    	list *List2[TElem]
    	Value TElem
    }
    
    type List2[TElem any] struct {
    	root Element2[TElem]
    	len  int
    }
    
    func (l *List2[TElem]) Init() *List2[TElem] {
    	l.root.next = &l.root
    	l.root.prev = &l.root
    	l.len = 0
    	return l
    }
    
    // Self-recursive instantiations must work correctly.
    type A[P any] struct { _ *A[P] }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:56:37 UTC 2023
    - 6K bytes
    - Viewed (0)
  6. src/testing/fstest/mapfs.go

    		for fname, f := range fsys {
    			if strings.HasPrefix(fname, prefix) {
    				felem := fname[len(prefix):]
    				i := strings.Index(felem, "/")
    				if i < 0 {
    					list = append(list, mapFileInfo{felem, f})
    				} else {
    					need[fname[len(prefix):len(prefix)+i]] = true
    				}
    			}
    		}
    		// If the directory name is not in the map,
    		// and there are no children of the name in the map,
    		// then the directory is treated as not existing.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  7. src/runtime/debug/mod.go

    		newline   = "\n"
    		tab       = "\t"
    	)
    
    	readModuleLine := func(elem []string) (Module, error) {
    		if len(elem) != 2 && len(elem) != 3 {
    			return Module{}, fmt.Errorf("expected 2 or 3 columns; got %d", len(elem))
    		}
    		version := elem[1]
    		sum := ""
    		if len(elem) == 3 {
    			sum = elem[2]
    		}
    		return Module{
    			Path:    elem[0],
    			Version: version,
    			Sum:     sum,
    		}, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 15:06:51 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  8. schema/utils.go

    	case reflect.Slice, reflect.Array:
    		for i := 0; i < reflectValue.Len(); i++ {
    			elem := reflectValue.Index(i)
    			elemKey := elem.Interface()
    			if elem.Kind() != reflect.Ptr && elem.CanAddr() {
    				elemKey = elem.Addr().Interface()
    			}
    
    			if _, ok := loaded[elemKey]; ok {
    				continue
    			}
    			loaded[elemKey] = true
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Aug 19 13:35:14 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  9. test/fixedbugs/issue53702.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    type Elem struct{}
    
    func (*Elem) Wait(callback func()) {}
    
    type Base struct {
    	elem [8]*Elem
    }
    
    var g_val = 1
    
    func (s *Base) Do() *int {
    	resp := &g_val
    	for _, e := range s.elem {
    		e.Wait(func() {
    			*resp = 0
    		})
    	}
    	return resp
    }
    
    type Sub struct {
    	*Base
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Aug 14 00:14:04 UTC 2022
    - 551 bytes
    - Viewed (0)
  10. src/go/types/map.go

    // A Map represents a map type.
    type Map struct {
    	key, elem Type
    }
    
    // NewMap returns a new map for the given key and element types.
    func NewMap(key, elem Type) *Map {
    	return &Map{key: key, elem: elem}
    }
    
    // Key returns the key type of map m.
    func (m *Map) Key() Type { return m.key }
    
    // Elem returns the element type of map m.
    func (m *Map) Elem() Type { return m.elem }
    
    func (t *Map) Underlying() Type { return t }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 781 bytes
    - Viewed (0)
Back to top