Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for 20 (0.11 sec)

  1. src/cmd/cgo/internal/test/cthread_windows.c

    __stdcall
    static unsigned int
    addThread(void *p)
    {
    	int i, max;
    	
    	max = *(int*)p;
    	for(i=0; i<max; i++)
    		Add(i);
    	return 0;
    }
    
    void
    doAdd(int max, int nthread)
    {
    	enum { MaxThread = 20 };
    	int i;
    	uintptr_t thread_id[MaxThread];
    	
    	if(nthread > MaxThread)
    		nthread = MaxThread;
    	for(i=0; i<nthread; i++)
    		thread_id[i] = _beginthreadex(0, 0, addThread, &max, 0, 0);
    	for(i=0; i<nthread; i++) {
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed May 17 21:53:11 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/arch/arm.go

    	op1 := int64(0)
    	if op == arm.AMRC {
    		op1 = 1
    	}
    	bits, ok := ParseARMCondition(cond)
    	if !ok {
    		return
    	}
    	offset = (0xe << 24) | // opcode
    		(op1 << 20) | // MCR/MRC
    		((int64(bits) ^ arm.C_SCOND_XOR) << 28) | // scond
    		((x0 & 15) << 8) | //coprocessor number
    		((x1 & 7) << 21) | // coprocessor operation
    		((x2 & 15) << 12) | // ARM register
    		((x3 & 15) << 16) | // Crn
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Nov 18 17:59:44 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  3. src/bytes/compare_test.go

    		if Compare(b1, b2) != -1 {
    			b.Fatal("b1 < b2 failed")
    		}
    	}
    }
    
    func benchmarkCompareBytesBigUnaligned(b *testing.B, offset int) {
    	b.StopTimer()
    	b1 := make([]byte, 0, 1<<20)
    	for len(b1) < 1<<20 {
    		b1 = append(b1, "Hello Gophers!"...)
    	}
    	b2 := append([]byte("12345678")[:offset], b1...)
    	b.StartTimer()
    	for j := 0; j < b.N; j++ {
    		if Compare(b1, b2[offset:]) != 0 {
    			b.Fatal("b1 != b2")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  4. src/bytes/reader_test.go

    	r := NewReader([]byte("0123456789"))
    	tests := []struct {
    		off     int64
    		seek    int
    		n       int
    		want    string
    		wantpos int64
    		readerr error
    		seekerr string
    	}{
    		{seek: io.SeekStart, off: 0, n: 20, want: "0123456789"},
    		{seek: io.SeekStart, off: 1, n: 1, want: "1"},
    		{seek: io.SeekCurrent, off: 1, wantpos: 3, n: 2, want: "34"},
    		{seek: io.SeekStart, off: -1, seekerr: "bytes.Reader.Seek: negative position"},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/test/cthread_unix.c

    #include "_cgo_export.h"
    
    static void*
    addThread(void *p)
    {
    	int i, max;
    	
    	max = *(int*)p;
    	for(i=0; i<max; i++)
    		Add(i);
    	return 0;
    }
    
    void
    doAdd(int max, int nthread)
    {
    	enum { MaxThread = 20 };
    	int i;
    	pthread_t thread_id[MaxThread];
    	
    	if(nthread > MaxThread)
    		nthread = MaxThread;
    	for(i=0; i<nthread; i++)
    		pthread_create(&thread_id[i], 0, addThread, &max);
    	for(i=0; i<nthread; i++)
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed May 17 21:53:11 GMT 2023
    - 1K bytes
    - Viewed (0)
  6. src/arena/arena_test.go

    // license that can be found in the LICENSE file.
    
    //go:build goexperiment.arenas
    
    package arena_test
    
    import (
    	"arena"
    	"testing"
    )
    
    type T1 struct {
    	n int
    }
    type T2 [1 << 20]byte // 1MiB
    
    func TestSmoke(t *testing.T) {
    	a := arena.NewArena()
    	defer a.Free()
    
    	tt := arena.New[T1](a)
    	tt.n = 1
    
    	ts := arena.MakeSlice[T1](a, 99, 100)
    	if len(ts) != 99 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 742 bytes
    - Viewed (0)
Back to top