Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 602 for mask1 (0.05 sec)

  1. test/fixedbugs/issue23305.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func mask1(a, b uint64) uint64 {
    	op1 := int32(a)
    	op2 := int32(b)
    	return uint64(uint32(op1 / op2))
    }
    
    var mask2 = mask1
    
    func main() {
    	res1 := mask1(0x1, 0xfffffffeffffffff)
    	res2 := mask2(0x1, 0xfffffffeffffffff)
    	if res1 != 0xffffffff {
    		println("got", res1, "want", 0xffffffff)
    		panic("FAIL")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 02 21:08:35 UTC 2018
    - 575 bytes
    - Viewed (0)
  2. src/image/draw/bench_test.go

    	}
    
    	var mask image.Image
    	switch mcm {
    	case nil:
    		// No-op.
    	case color.AlphaModel:
    		mask1 := image.NewAlpha(image.Rect(0, 0, srcw, srch))
    		for y := 0; y < srch; y++ {
    			for x := 0; x < srcw; x++ {
    				a := uint8((23*x + 29*y) % 0x100)
    				// Glyph masks are typically mostly zero,
    				// so we only set a quarter of mask1's pixels.
    				if a >= 0xc0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:07:05 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  3. src/unicode/utf8/utf8.go

    		return rune(p0&mask2)<<6 | rune(b1&maskx), 2
    	}
    	b2 := p[2]
    	if b2 < locb || hicb < b2 {
    		return RuneError, 1
    	}
    	if sz <= 3 {
    		return rune(p0&mask3)<<12 | rune(b1&maskx)<<6 | rune(b2&maskx), 3
    	}
    	b3 := p[3]
    	if b3 < locb || hicb < b3 {
    		return RuneError, 1
    	}
    	return rune(p0&mask4)<<18 | rune(b1&maskx)<<12 | rune(b2&maskx)<<6 | rune(b3&maskx), 4
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:36 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  4. src/runtime/utf8.go

    		if len(s) > 1 && (locb <= s[1] && s[1] <= hicb) {
    			r = rune(s[0]&mask2)<<6 | rune(s[1]&maskx)
    			pos += 2
    			if rune1Max < r {
    				return
    			}
    		}
    	case t3 <= s[0] && s[0] < t4:
    		// 0800-FFFF three byte sequence
    		if len(s) > 2 && (locb <= s[1] && s[1] <= hicb) && (locb <= s[2] && s[2] <= hicb) {
    			r = rune(s[0]&mask3)<<12 | rune(s[1]&maskx)<<6 | rune(s[2]&maskx)
    			pos += 3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 06 02:46:02 UTC 2020
    - 3.4K bytes
    - Viewed (0)
  5. internal/pubsub/mask.go

    	"math"
    	"math/bits"
    )
    
    // Mask allows filtering by a bitset mask.
    type Mask uint64
    
    const (
    	// MaskAll is the mask for all entries.
    	MaskAll Mask = math.MaxUint64
    )
    
    // MaskFromMaskable extracts mask from an interface.
    func MaskFromMaskable(m Maskable) Mask {
    	return Mask(m.Mask())
    }
    
    // Contains returns whether *all* flags in other is present in t.
    func (t Mask) Contains(other Mask) bool {
    	return t&other == other
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jul 05 21:45:49 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  6. src/syscall/wtf8_windows.go

    			// Check if s[i:] contains a valid WTF-8 encoded surrogate.
    			if sc := s[i:]; len(sc) >= 3 && sc[0] == 0xED && 0xA0 <= sc[1] && sc[1] <= 0xBF && 0x80 <= sc[2] && sc[2] <= 0xBF {
    				r = rune(sc[0]&mask3)<<12 + rune(sc[1]&maskx)<<6 + rune(sc[2]&maskx)
    				buf = append(buf, uint16(r))
    				i += 3
    				continue
    			}
    		}
    		i += size
    		buf = utf16.AppendRune(buf, r)
    	}
    	return buf
    }
    
    // decodeWTF16 returns the WTF-8 encoding of
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 15 09:26:16 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/topologymanager/bitmask/bitmask.go

    		}
    		mask &^= 1 << uint64(i)
    	}
    	*s = mask
    	return nil
    }
    
    // And performs and operation on all bits in masks
    func (s *bitMask) And(masks ...BitMask) {
    	for _, m := range masks {
    		*s &= *m.(*bitMask)
    	}
    }
    
    // Or performs or operation on all bits in masks
    func (s *bitMask) Or(masks ...BitMask) {
    	for _, m := range masks {
    		*s |= *m.(*bitMask)
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 03 09:45:09 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/rewrite.go

    	} else if nbits == 32 {
    		mb = bits.LeadingZeros32(uint32(mask))
    		me = 32 - bits.TrailingZeros32(uint32(mask))
    		mbn = bits.LeadingZeros32(^uint32(mask))
    		men = 32 - bits.TrailingZeros32(^uint32(mask))
    	} else {
    		mb = bits.LeadingZeros64(uint64(mask))
    		me = 64 - bits.TrailingZeros64(uint64(mask))
    		mbn = bits.LeadingZeros64(^uint64(mask))
    		men = 64 - bits.TrailingZeros64(^uint64(mask))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  9. src/image/draw/draw.go

    					return
    				}
    			} else if mask0, ok := mask.(*image.Alpha); ok {
    				switch src0 := src.(type) {
    				case *image.Uniform:
    					drawGlyphOver(dst0, r, src0, mask0, mp)
    					return
    				case *image.RGBA:
    					drawRGBAMaskOver(dst0, r, src0, sp, mask0, mp)
    					return
    				case *image.Gray:
    					drawGrayMaskOver(dst0, r, src0, sp, mask0, mp)
    					return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  10. src/image/draw/clip_test.go

    	src0 := image.NewRGBA(image.Rect(0, 0, 100, 100))
    	mask0 := image.NewRGBA(image.Rect(0, 0, 100, 100))
    	for _, c := range clipTests {
    		dst := dst0.SubImage(c.dr).(*image.RGBA)
    		src := src0.SubImage(c.sr).(*image.RGBA)
    		r, sp, mp := c.r, c.sp, c.mp
    		if c.nilMask {
    			clip(dst, &r, src, &sp, nil, nil)
    		} else {
    			clip(dst, &r, src, &sp, mask0.SubImage(c.mr), &mp)
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:07:05 UTC 2023
    - 4.4K bytes
    - Viewed (0)
Back to top