You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2012/08/23 15:37:26 UTC
svn commit: r1376483 - in /lucene/dev/trunk/lucene/core: build.xml
src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java
src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
Author: mikemccand
Date: Thu Aug 23 13:37:25 2012
New Revision: 1376483
URL: http://svn.apache.org/viewvc?rev=1376483&view=rev
Log:
also gen all other sources from ant target; fixed gen_Packed64SingleBlock.py to match current sources
Modified:
lucene/dev/trunk/lucene/core/build.xml
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
Modified: lucene/dev/trunk/lucene/core/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/build.xml?rev=1376483&r1=1376482&r2=1376483&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/build.xml (original)
+++ lucene/dev/trunk/lucene/core/build.xml Thu Aug 23 13:37:25 2012
@@ -76,12 +76,24 @@
</sequential>
</macrodef>
- <target name="createBulkPackedIntSources">
+ <target name="createPackedIntSources">
<exec dir="src/java/org/apache/lucene/util/packed"
executable="${python.exe}" failonerror="true">
<arg value="gen_BulkOperation.py"/>
</exec>
- <fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java" encoding="UTF-8"/>
+ <exec dir="src/java/org/apache/lucene/util/packed"
+ executable="${python.exe}" failonerror="true">
+ <arg value="gen_Direct.py"/>
+ </exec>
+ <exec dir="src/java/org/apache/lucene/util/packed"
+ executable="${python.exe}" failonerror="true">
+ <arg value="gen_Packed64SingleBlock.py"/>
+ </exec>
+ <exec dir="src/java/org/apache/lucene/util/packed"
+ executable="${python.exe}" failonerror="true">
+ <arg value="gen_PackedThreeBlocks.py"/>
+ </exec>
+ <fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java,Direct*.java,Packed64SingleBlock.java,Packed*ThreeBlocks.py" encoding="UTF-8"/>
</target>
<target name="createLevAutomata" depends="check-moman,clone-moman,pull-moman">
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java?rev=1376483&r1=1376482&r2=1376483&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java Thu Aug 23 13:37:25 2012
@@ -581,4 +581,4 @@ abstract class Packed64SingleBlock exten
}
-}
\ No newline at end of file
+}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py?rev=1376483&r1=1376482&r2=1376483&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py Thu Aug 23 13:37:25 2012
@@ -105,12 +105,12 @@ abstract class Packed64SingleBlock exten
// bulk get
assert index %% valuesPerBlock == 0;
- final BulkOperation op = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
- assert op.blocks() == 1;
- assert op.values() == valuesPerBlock;
+ final PackedInts.Decoder decoder = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
+ assert decoder.blockCount() == 1;
+ assert decoder.valueCount() == valuesPerBlock;
final int blockIndex = index / valuesPerBlock;
final int nblocks = (index + len) / valuesPerBlock - blockIndex;
- op.get(blocks, blockIndex, arr, off, nblocks);
+ decoder.decode(blocks, blockIndex, arr, off, nblocks);
final int diff = nblocks * valuesPerBlock;
index += diff; len -= diff;
@@ -150,11 +150,11 @@ abstract class Packed64SingleBlock exten
// bulk set
assert index %% valuesPerBlock == 0;
final BulkOperation op = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
- assert op.blocks() == 1;
- assert op.values() == valuesPerBlock;
+ assert op.blockCount() == 1;
+ assert op.valueCount() == valuesPerBlock;
final int blockIndex = index / valuesPerBlock;
final int nblocks = (index + len) / valuesPerBlock - blockIndex;
- op.set(blocks, blockIndex, arr, off, nblocks);
+ op.encode(arr, off, blocks, blockIndex, nblocks);
final int diff = nblocks * valuesPerBlock;
index += diff; len -= diff;