You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2012/08/20 15:21:45 UTC

svn commit: r1375008 - /lucene/dev/branches/pforcodec_3892/lucene/core/src/java/org/apache/lucene/codecs/block/ForUtil.java

Author: jpountz
Date: Mon Aug 20 13:21:45 2012
New Revision: 1375008

URL: http://svn.apache.org/viewvc?rev=1375008&view=rev
Log:
LUCENE-3892: Re-use ForUtil#computeIterations to compute MAX_SATA_SIZE.

Modified:
    lucene/dev/branches/pforcodec_3892/lucene/core/src/java/org/apache/lucene/codecs/block/ForUtil.java

Modified: lucene/dev/branches/pforcodec_3892/lucene/core/src/java/org/apache/lucene/codecs/block/ForUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/pforcodec_3892/lucene/core/src/java/org/apache/lucene/codecs/block/ForUtil.java?rev=1375008&r1=1375007&r2=1375008&view=diff
==============================================================================
--- lucene/dev/branches/pforcodec_3892/lucene/core/src/java/org/apache/lucene/codecs/block/ForUtil.java (original)
+++ lucene/dev/branches/pforcodec_3892/lucene/core/src/java/org/apache/lucene/codecs/block/ForUtil.java Mon Aug 20 13:21:45 2012
@@ -63,7 +63,7 @@ final class ForUtil {
             continue;
           }
           final PackedInts.Decoder decoder = PackedInts.getDecoder(format, version, bpv);
-          final int iterations = (int) Math.ceil((float) BLOCK_SIZE / decoder.valueCount());
+          final int iterations = computeIterations(decoder);
           maxDataSize = Math.max(maxDataSize, iterations * decoder.valueCount());
         }
       }