Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for coffsets (0.29 sec)

  1. src/image/ycbcr.go

    		return color.YCbCr{}
    	}
    	yi := p.YOffset(x, y)
    	ci := p.COffset(x, y)
    	return color.YCbCr{
    		p.Y[yi],
    		p.Cb[ci],
    		p.Cr[ci],
    	}
    }
    
    // YOffset returns the index of the first element of Y that corresponds to
    // the pixel at (x, y).
    func (p *YCbCr) YOffset(x, y int) int {
    	return (y-p.Rect.Min.Y)*p.YStride + (x - p.Rect.Min.X)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/sizes_test.go

    			// Make a copy manually :(
    			for i := 0; i < ts.NumFields(); i++ {
    				fields = append(fields, ts.Field(i))
    			}
    
    			offsets := conf.Sizes.Offsetsof(fields)
    			if offsets[0] != want[0] || offsets[1] != want[1] || offsets[2] != want[2] {
    				t.Errorf("OffsetsOf(%v) = %v want %v", ts, offsets, want)
    			}
    		})
    	}
    }
    
    type gcSizeTest struct {
    	name string
    	src  string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 21:00:48 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  3. src/go/types/sizes_test.go

    			// Make a copy manually :(
    			for i := 0; i < ts.NumFields(); i++ {
    				fields = append(fields, ts.Field(i))
    			}
    
    			offsets := conf.Sizes.Offsetsof(fields)
    			if offsets[0] != want[0] || offsets[1] != want[1] || offsets[2] != want[2] {
    				t.Errorf("OffsetsOf(%v) = %v want %v", ts, offsets, want)
    			}
    		})
    	}
    }
    
    type gcSizeTest struct {
    	name string
    	src  string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 21:00:48 UTC 2023
    - 4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/sizes.go

    	var offsets []int64
    	if T.NumFields() > 0 {
    		// compute offsets on demand
    		f := stdSizes.Offsetsof
    		if conf.Sizes != nil {
    			f = conf.Sizes.Offsetsof
    		}
    		offsets = f(T.fields)
    		// sanity checks
    		if len(offsets) != T.NumFields() {
    			panic("implementation of offsetsof returned the wrong number of offsets")
    		}
    	}
    	return offsets
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  5. src/go/types/sizes.go

    	var offsets []int64
    	if T.NumFields() > 0 {
    		// compute offsets on demand
    		f := stdSizes.Offsetsof
    		if conf.Sizes != nil {
    			f = conf.Sizes.Offsetsof
    		}
    		offsets = f(T.fields)
    		// sanity checks
    		if len(offsets) != T.NumFields() {
    			panic("implementation of offsetsof returned the wrong number of offsets")
    		}
    	}
    	return offsets
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  6. src/go/types/gcsizes.go

    	return a
    }
    
    func (s *gcSizes) Offsetsof(fields []*Var) []int64 {
    	offsets := make([]int64, len(fields))
    	var offs int64
    	for i, f := range fields {
    		if offs < 0 {
    			// all remaining offsets are too large
    			offsets[i] = -1
    			continue
    		}
    		// offs >= 0
    		a := s.Alignof(f.typ)
    		offs = align(offs, a) // possibly < 0 if align overflows
    		offsets[i] = offs
    		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/gcsizes.go

    	return a
    }
    
    func (s *gcSizes) Offsetsof(fields []*Var) []int64 {
    	offsets := make([]int64, len(fields))
    	var offs int64
    	for i, f := range fields {
    		if offs < 0 {
    			// all remaining offsets are too large
    			offsets[i] = -1
    			continue
    		}
    		// offs >= 0
    		a := s.Alignof(f.typ)
    		offs = align(offs, a) // possibly < 0 if align overflows
    		offsets[i] = offs
    		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  8. src/internal/syscall/unix/siginfo_linux_test.go

    		// These two fields are swapped on MIPS platforms.
    		ofErrno, ofCode = ofCode, ofErrno
    	}
    	ofPid := 12
    	if host64bit {
    		ofPid = 16
    	}
    	ofUid := ofPid + 4
    	ofStatus := ofPid + 8
    
    	offsets := []struct {
    		name string
    		got  uintptr
    		want int
    	}{
    		{"Signo", unsafe.Offsetof(si.Signo), ofSigno},
    		{"Errno", unsafe.Offsetof(si.Errno), ofErrno},
    		{"Code", unsafe.Offsetof(si.Code), ofCode},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 01:23:00 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/text/cases/trieval.go

    var trie = newCaseTrie(0)
    
    var sparse = sparseBlocks{
    	values:  sparseValues[:],
    	offsets: sparseOffsets[:],
    }
    
    // Sparse block lookup code.
    
    // valueRange is an entry in a sparse block.
    type valueRange struct {
    	value  uint16
    	lo, hi byte
    }
    
    type sparseBlocks struct {
    	values  []valueRange
    	offsets []uint16
    }
    
    // lookup returns the value from values block n for byte b using binary search.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  10. test/fixedbugs/issue6036.go

    // Copyright 2013 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 6036: 6g's backend generates OINDREG with
    // offsets larger than 32-bit.
    
    package main
    
    type T struct {
    	Large [1 << 31]byte
    	A     int
    	B     int
    }
    
    func F(t *T) {
    	t.B = t.A
    }
    
    type T2 [1<<31 + 2]byte
    
    func F2(t *T2) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 652 bytes
    - Viewed (0)
Back to top