Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 168 for Mask (0.13 sec)

  1. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 35.8K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/collect/HashMultisetAddPresentBenchmark.java

    import java.util.Random;
    
    /**
     * Benchmark for HashMultiset.add for an already-present element.
     *
     * @author Louis Wasserman
     */
    public class HashMultisetAddPresentBenchmark {
      private static final int ARRAY_MASK = 0x0ffff;
      private static final int ARRAY_SIZE = 0x10000;
      List<Multiset<Integer>> multisets = new ArrayList<>(0x10000);
      int[] queries = new int[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.6K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += oldSlowFactorial(slowFactorials[j]).intValue();
        }
        return tmp;
      }
    
      @Benchmark
      int factorial(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += BigIntegerMath.factorial(factorials[j]).intValue();
        }
        return tmp;
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.3K bytes
    - Viewed (0)
  4. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Striped.java

        final int mask;
    
        PowerOfTwoStriped(int stripes) {
          Preconditions.checkArgument(stripes > 0, "Stripes must be positive");
          this.mask = stripes > Ints.MAX_POWER_OF_TWO ? ALL_SET : ceilToPowerOfTwo(stripes) - 1;
        }
    
        @Override
        final int indexFor(Object key) {
          int hash = smear(key.hashCode());
          return hash & mask;
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 10 20:55:18 GMT 2023
    - 20.3K bytes
    - Viewed (1)
  6. android/guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

        int[] expected = new int[256];
        for (int i = 0; i < expected.length; i++) {
          int crc = i;
          for (int j = 7; j >= 0; j--) {
            int mask = -(crc & 1);
            crc = ((crc >>> 1) ^ (CRC32C_GENERATOR_FLIPPED & mask));
          }
          expected[i] = crc;
        }
    
        int[] actual = Crc32cHashFunction.Crc32cHasher.BYTE_TABLE;
        assertTrue(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  7. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/SmallCharMatcher.java

            index = (index + 1) & mask;
          }
        }
        return new SmallCharMatcher(table, filter, containsZero, description);
      }
    
      @Override
      public boolean matches(char c) {
        if (c == 0) {
          return containsZero;
        }
        if (!checkFilter(c)) {
          return false;
        }
        int mask = table.length - 1;
        int startingIndex = smear(c) & mask;
        int index = startingIndex;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/collect/SetContainsBenchmark.java

        // Should write a benchmark to test that!
        Set<Element> set = setToTest;
        Element[] queries = this.queries;
    
        int mask = queries.length - 1;
    
        boolean dummy = false;
        for (int i = 0; i < reps; i++) {
          dummy ^= set.contains(queries[i & mask]);
        }
        return dummy;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/collect/SetContainsBenchmark.java

        // Should write a benchmark to test that!
        Set<Element> set = setToTest;
        Element[] queries = this.queries;
    
        int mask = queries.length - 1;
    
        boolean dummy = false;
        for (int i = 0; i < reps; i++) {
          dummy ^= set.contains(queries[i & mask]);
        }
        return dummy;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
Back to top