Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 275 for Mask (0.15 sec)

  1. 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
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jul 05 21:45:49 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/CompactHashing.java

      static int getHashPrefix(int value, int mask) {
        return value & ~mask;
      }
    
      /** Returns the index, or 0 if the entry is "null". */
      static int getNext(int entry, int mask) {
        return entry & mask;
      }
    
      /** Returns a new value combining the prefix and suffix using the given mask. */
      static int maskCombine(int prefix, int suffix, int mask) {
        return (prefix & ~mask) | (suffix & mask);
      }
    
      static int remove(
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Aug 02 21:41:22 GMT 2021
    - 7.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/CompactHashing.java

      static int getHashPrefix(int value, int mask) {
        return value & ~mask;
      }
    
      /** Returns the index, or 0 if the entry is "null". */
      static int getNext(int entry, int mask) {
        return entry & mask;
      }
    
      /** Returns a new value combining the prefix and suffix using the given mask. */
      static int maskCombine(int prefix, int suffix, int mask) {
        return (prefix & ~mask) | (suffix & mask);
      }
    
      static int remove(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Aug 02 21:41:22 GMT 2021
    - 7.1K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/math/LessThanBenchmark.java

          xLongs[i] = random.nextLong() & NONNEGATIVE_LONG_MASK;
          yLongs[i] = random.nextLong() & NONNEGATIVE_LONG_MASK;
          constant[i] = random.nextInt();
        }
      }
    
      @Benchmark
      int branchFreeLtIntInlined(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & SAMPLE_MASK;
          int x = xInts[j];
          int y = yInts[j];
          int z = constant[j];
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  5. internal/pubsub/pubsub.go

    	sub := &Sub[T]{ch: subCh, types: Mask(mask.Mask()), filter: filter}
    	ps.subs = append(ps.subs, sub)
    
    	// We hold a lock, so we are safe to update
    	combined := Mask(atomic.LoadUint64(&ps.types))
    	combined.Merge(Mask(mask.Mask()))
    	atomic.StoreUint64(&ps.types, uint64(combined))
    
    	go func() {
    		<-doneCh
    
    		ps.Lock()
    		defer ps.Unlock()
    		var remainTypes Mask
    		for i, s := range ps.subs {
    			if s == sub {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java

      int pow(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += LongMath.pow(positive[j], exponents[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int mod(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += LongMath.mod(longs[j], positive[j]);
        }
        return tmp;
      }
    
      @Benchmark
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

      @Benchmark
      int pow(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.pow(positive[j], exponent[j]);
        }
        return tmp;
      }
    
      @Benchmark
      int mod(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.mod(ints[j], positive[j]);
        }
        return tmp;
      }
    
      @Benchmark
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java

      int log2(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += BigIntegerMath.log2(positive[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      int log10(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += BigIntegerMath.log10(positive[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 30 13:06:20 GMT 2020
    - 2.8K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java

        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += Double.doubleToRawLongBits(impl.factorialDouble(factorials[j]));
        }
        return tmp;
      }
    
      @Benchmark
      int intGCD(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += impl.gcdInt(nonnegInt[j][0], nonnegInt[j][1]);
        }
        return tmp;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.9K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java

      long divide(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += UnsignedLongs.divide(longs[j], divisors[j]);
        }
        return tmp;
      }
    
      @Benchmark
      long remainder(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += UnsignedLongs.remainder(longs[j], divisors[j]);
        }
        return tmp;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.3K bytes
    - Viewed (0)
Back to top