Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 499 for mask (0.2 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 19 12:43:09 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 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/CompactHashMap.java

        int hash = smearedHash(key);
        int mask = hashTableMask();
        int tableIndex = hash & mask;
        int next = CompactHashing.tableGet(requireTable(), tableIndex);
        if (next == UNSET) { // uninitialized bucket
          if (newSize > mask) {
            // Resize and add new entry
            mask = resizeTable(mask, CompactHashing.newCapacity(mask), hash, newEntryIndex);
          } else {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 35.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/CompactHashSet.java

        int hash = smearedHash(object);
        int mask = hashTableMask();
        int tableIndex = hash & mask;
        int next = CompactHashing.tableGet(requireTable(), tableIndex);
        if (next == UNSET) { // uninitialized bucket
          if (newSize > mask) {
            // Resize and add new entry
            mask = resizeTable(mask, CompactHashing.newCapacity(mask), hash, newEntryIndex);
          } else {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 05 21:38:59 GMT 2024
    - 24K bytes
    - Viewed (0)
  7. 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 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.9K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

      @Benchmark
      int log2(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.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 += IntMath.log10(positive[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java

        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += DoubleMath.roundToInt(doubleInIntRange[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      long roundToLong(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += DoubleMath.roundToLong(doubleInLongRange[j], mode);
        }
        return tmp;
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  10. 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)
Back to top